安装nvm
curl -o- raw.githubusercontent.com/creationix/… | bash
- command -v nvm
- source ~/.bashrc
- nvm --version
安装vim
- yum -y install vim*
安装wget
- yum install -y wget
安装mysql8
-
下载安装包 yum install -y wget cd /tmp rm -f mysql80-community-release-el7-11.noarch.rpm wget mirrors.tuna.tsinghua.edu.cn/mysql/yum/m…
-
安装 cd /tmp yum install -y mysql80-community-release-el7-11.noarch.rpm yum clean all yum makecache
-
查看安装源是否成功
- yum 安装 MySQL 8.0
yum install -y mysql-community-server.x86_64
- 启动 MySQL 服务器
如果这里等太久,可按键盘的 Ctrl + c 退出来再重新执行
systemctl start mysqld
systemctl status -l mysqld
systemctl enable mysqld
- 获取 MySQL 的初始密码
grep 'A temporary password' /var/log/mysqld.log | tail -1 >/tmp/mysql-init-password.txt
cat /tmp/mysql-init-password.txt, 就会出现类似的输出
2024-05-27T10:21:07.659139Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: <qL/aF4/k5V
上面文本中最末尾的“<qL/aF4/k5V”就是 MySQL 生成的密码。
7.配置初始化
mysql_secure_installation
Enter password for user root:: 输入文件 /root/mysql-init-password.txt 里面的密码; New password::输入新密码;
Re-enter new password:: 确定新密码;
Change the password for root ?:输入 n 就行;
Remove anonymous users?:移除匿名用户,输入 y 或 Y;
Disallow root login remotely?:是否允许 root 用户远程登录,如果你希望是的话,便输入 Y 或 y,否则输入其他任意键,比如 n;
Remove test database and access to it?:是否移除测试数据库以及访问它,一般情况下输入 y 或 Y 即可;
Reload privilege tables now?:重载权限表,输入 y 或 Y 实际上相当于执行 flush privileges; 命令,从而使以上的配置立即生效,而不用重启 MySQL 服务器进程。
- 配置好启动mysql
systemctl restart mysqld systemctl status -l mysqld
- 修改访问权限,允许非本地访问,比如使用navigate访问
mysql -u root -p
use mysql;
select Host,User from user;
update user set Host='%' where User='root';
刷新生效
flush privileges;
- 开放端口相关命令
如果要开放的端口太多,嫌麻烦,可以关闭防火墙,安全性自行评估
systemctl stop firewalld.service
- 使用navigate测试连接
安装node
- nvm list-remote
- nvm install v18.15.0
- 解决GLIBC_2.28' not found (required by node) blog.csdn.net/m0_63748493…
npm 切换淘宝源
- npm config set registry registry.npmmirror.com
npm config get registry
安装zlib
- 下载zlib-1.2.11.tar.gz
ar -zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11/
./configure --prefix=/usr/local/zlib
解决harsh错误
# if try $CC -c $CFLAGS $test.c; then
# :
# else
# echo "Compiler error reporting is too harsh for $0 (perhaps remove -Werror)." | tee -a configure.log
# leave 1
# fi
没有gcc yum group install "Development Tools"
make
make check
make install
echo "/usr/local/zlib/lib" >> /etc/ld.so.conf
ldconfig -v
安装pm2
- npm install pm2 --location=global
安装nginx
yum install epel-release yum update
-
yum -y install nginx
-
service nginx start
安装unzip
- yum install unzip zip
安装git
- yum install packages.endpointdev.com/rhel/7/os/x…
- yum install -y git