ubuntu云服务器配置
文章目录
mysql
- 安装
sudo apt update
sudo apt install mysql-server
sudo systemctl status mysql
sudo systemctl restart mysql- 配置远程访问
create user 'tu'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'tu'@'%';
FLUSH PRIVILEGES;找到my.cnf,一般在/etc/mysql/mysql.conf.d/mysqld.cnf,将bind_address 改为 0.0.0.0
- 开放3306端口
在云服务器中配置安全策略,设置入口允许3306端口
nginx
- 安装
sudo apt update
sudo apt install nginx
sudo systemctl start nginx- 配置
cd /etc/nginx/sites-enabled/
vim defaultnodejs
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.38.0/install.sh | bash
source ~/.bashrc
nvm install 16
npm config set registry https://registry.npmmirror.comgit
sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \
libz-dev libssl-dev
sudo apt-get install git
git --version
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论