lizhengfa 2020-06-26
cat /etc/issue
yum list java*
此次选择java-1.8.0-openjdk-devel.x86_64 : OpenJDK Development Environment
yum install java-1.8.0-openjdk-devel.x86_64
打开配置文件,按insert进入编辑模式
vi /etc/profile
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el6_9.x86_64 export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bin
source /etc/profile
java -version
sudo rpm -ivh https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
sudo yum repolist all | grep mysql | grep enabled
如果展示像下面,则表示成功添加仓库:
mysql-connectors-community/x86_64 MySQL Connectors Community enabled: 51 mysql-tools-community/x86_64 MySQL Tools Community enabled: 63 mysql57-community/x86_64 MySQL 5.7 Community Server enabled: 267
sudo yum -y install mysql-community-server
1.启动 sudo systemctl start mysqld 2.设置系统启动时自动启动 sudo systemctl enable mysqld 3.查看启动状态 sudo systemctl status mysqld
cat /var/log/mysqld.log | grep -i ‘temporary password‘
执行下面命令进行安全设置,这个命令会进行设置root密码设置,移除匿名用户,禁止root用户远程连接等
mysql_secure_installation
1.打开配置文件 sudo vim /etc/my.cnf 2.在[mysqld],[client],[mysql]节点下添加编码设置 [client] default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] collation-server = utf8_unicode_ci init-connect=‘SET NAMES utf8‘ character-set-server = utf8 3.重启Mysql即可 sudo systemctl restart mysqld
1. 创建文件夹 mkdir nodejs 2. 进入文件夹 cd nodejs 3.下载源码(官网查看最新版本链接) wget http://nodejs.org/dist/v0.10.30/node-v0.10.30.tar.gz 4.解压源码 tar xzvf node-v* && cd node-v* 注意解压缩的文件名称与现存的关系,不要弄混了 5.安装必要的编译软件 sudo yum install gcc gcc-c++ 6.编译 ./configure make 7.编译&安装 sudo make install 8.查看版本(测试安装是否成功) node --version