因为公司新的业务的需要,租了一台阿里云服务器,先要安装软件环境,记录一下
1.新建用户
# useradd –d /data/qnhz -m qnhz
此命令创建了一个用户qnhz,其中-d和-m选项用来为登录名qnhz产生一个主目录/data/qnhz(/usr为默认的用户主目录所在的父目录)。
假设当前用户是sam,则下面的命令修改该用户自己的口令:
# passwd
Old password:******
New password:*******
Re-enter new password:*******
如果是超级用户,可以用下列形式指定任何用户的口令:
# passwdqnhz
New password:*******
Re-enter new password:*******
2.rz sz命令安装
[root@xxxxx local]# yum install lrzsz
[root@iZbp1c36ego5can8kprgpoZ scripts]# cmake .(有个点)
CMake Error: The source directory "/usr/anzhuangbao/mysql-5.6.35-linux-glibc2.5-x86_64/scripts" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
在官网上下载了一个300MB的安装包后,cmake时一直提示如上错误
发现原来是安装包搞错了
http://download.csdn.net/download/huang201314/7466765
换了个包 cmake . 就过了
mysql> insert into mysql.user(Host,User,Password) values('localhost','qiniu' ,password('qiniu2017'));
ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value
mysql> Ctrl-C -- exit!
Aborted
解决办法
[root@iZbp1c36ego5can8kprgpoZ ~]# find / -name my.cnf
/usr/my.cnf
[root@iZbp1c36ego5can8kprgpoZ ~]# vi /usr/my.cnf
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES(红色删掉)[root@iZbp1c36ego5can8kprgpoZ ~]# service mysql restart
【ok】
安装 mysql参考转自https://m.th7.cn/show/48/201612/197024.html
下载 MySQL-5.6.35-1.linux_glibc2.5.x86_64.rpm-bundle.tar
解压 tar -xvf MySQL-5.6.35-1.linux_glibc2.5.x86_64.rpm-bundle.tar
cdMySQL-5.6.35// 改文件名为 MySQL-5.6.35
yum install MySQL-shared-compat-5.6.35-1.linux_glibc2.5.x86_64.rpm # 安装 RHEL兼容包
yum install MySQL-server-5.6.35-1.linux_glibc2.5.x86_64.rpm # MySQL服务端程序
yum install MySQL-client-5.6.35-1.linux_glibc2.5.x86_64.rpm # MySQL客户端程序
yum install MySQL-devel-5.6.35-1.linux_glibc2.5.x86_64.rpm # MySQL的库和头文件
yum install MySQL-shared-5.6.35-1.linux_glibc2.5.x86_64.rpm # MySQL的共享库
cat /root/.mysql_secret配置MySQL登录密码
// 获取MySQL安装时生成的随机密码 为BEYNx9iL0GJGRu0t
[root@iZbp1c36ego5can8kprgpoZ MySQL-5.6.35]# cat /root/.mysql_secret
# The random password set for the root user at Wed Mar 8 22:14:41 2017 (local time): BEYNx9iL0GJGRu0t
[root@iZbp1c36ego5can8kprgpoZ MySQL-5.6.35]#
service mysql start # 启动MySQL服务
mysql -uroot -p # 进入MySQL,
使用之前获取的随机密码
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypassword');
// 在MySQL命令行中设置root账户的密码为mypassword
quit # 退出MySQL命令行
4.安装nginx
安装make:
yum -y install gcc automake autoconf libtool make
安装g++:
yum install gcc gcc-c++
PCRE库:
yum install pcre pcre-develzlib库:
yum install zlib zlib-devel
OpenSSL:
yum install openssl openssl-devel
下载Nginx:
Nginx源代码包可以从官方网站下载http://nginx.org/en/download.html,目前最新稳定版本为1.10.1,还有开发版本可供选择。相关命令如下:
wget https://nginx.org/download/nginx-1.10.1.tar.gz
tar -xzxf nginx-1.10.1.tar.gz
cd nginx-1.10.1/
make
make install
done!
解决方法:
下载nginx的启动脚本:
# wget -O init-deb.sh http://library.linode.com/assets/660-init-deb.sh
将脚本添加到init.d目录和生成可执行:
# sudo mv init-deb.sh /etc/init.d/nginx
# sudo chmod +x /etc/init.d/nginx
加的nginx到系统启动:
# sudo /usr/sbin/update-rc.d -f nginx defaults
现在我们可以使用nginx的控制:
sudo service nginx stop
sudo service nginx start
sudo service nginx restart
sudo service nginx reload
来源http://blog.csdn.net/luoww1/article/details/52183950
5.安装memcached缓存服务
[root@iZbp1c36ego5can8kprgpoZ src]# yum install memcached(安装)
Complete!
[root@iZbp1c36ego5can8kprgpoZ local]# memcached -h(验证安装)
[root@iZbp1c36ego5can8kprgpoZ local]# chkconfig --level 2345 memcached on(设置开机启动)
[root@iZbp1c36ego5can8kprgpoZ local]# vi /etc/sysconfig/memcached (配置memcached)
PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS=""
[root@iZbp1c36ego5can8kprgpoZ local]# ls
aegis bin etc games include lib lib64 libexec nginx sbin share src
[root@iZbp1c36ego5can8kprgpoZ local]# ps -ef|grep memcached
root 17813 17740 0 10:04 pts/1 00:00:00 grep memcached
[root@iZbp1c36ego5can8kprgpoZ local]# service memcached start(启动memcached)
Starting memcached: [ OK ]
[root@iZbp1c36ego5can8kprgpoZ local]#
6.安装配置jdk
因为公司新的业务的需要,租了一台阿里云服务器,先要安装软件环境,记录一下
1.新建用户
# useradd –d /data/qnhz -m qnhz
此命令创建了一个用户qnhz,其中-d和-m选项用来为登录名qnhz产生一个主目录/data/qnhz(/usr为默认的用户主目录所在的父目录)。
假设当前用户是sam,则下面的命令修改该用户自己的口令:
# passwd
Old password:******
New password:*******
Re-enter new password:*******
如果是超级用户,可以用下列形式指定任何用户的口令:
# passwdqnhz
New password:*******
Re-enter new password:*******
2.rz sz命令安装
[root@xxxxx local]# yum install lrzsz
[root@iZbp1c36ego5can8kprgpoZ scripts]# cmake .(有个点)
CMake Error: The source directory "/usr/anzhuangbao/mysql-5.6.35-linux-glibc2.5-x86_64/scripts" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
在官网上下载了一个300MB的安装包后,cmake时一直提示如上错误
发现原来是安装包搞错了
http://download.csdn.net/download/huang201314/7466765
换了个包 cmake . 就过了
mysql> insert into mysql.user(Host,User,Password) values('localhost','qiniu' ,password('qiniu2017'));
ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value
mysql> Ctrl-C -- exit!
Aborted
解决办法
[root@iZbp1c36ego5can8kprgpoZ ~]# find / -name my.cnf
/usr/my.cnf
[root@iZbp1c36ego5can8kprgpoZ ~]# vi /usr/my.cnf
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES(红色删掉)[root@iZbp1c36ego5can8kprgpoZ ~]# service mysql restart
【ok】
安装 mysql参考转自https://m.th7.cn/show/48/201612/197024.html
下载 MySQL-5.6.35-1.linux_glibc2.5.x86_64.rpm-bundle.tar
解压 tar -xvf MySQL-5.6.35-1.linux_glibc2.5.x86_64.rpm-bundle.tar
cdMySQL-5.6.35// 改文件名为 MySQL-5.6.35
yum install MySQL-shared-compat-5.6.35-1.linux_glibc2.5.x86_64.rpm # 安装 RHEL兼容包
yum install MySQL-server-5.6.35-1.linux_glibc2.5.x86_64.rpm # MySQL服务端程序
yum install MySQL-client-5.6.35-1.linux_glibc2.5.x86_64.rpm # MySQL客户端程序
yum install MySQL-devel-5.6.35-1.linux_glibc2.5.x86_64.rpm # MySQL的库和头文件
yum install MySQL-shared-5.6.35-1.linux_glibc2.5.x86_64.rpm # MySQL的共享库
cat /root/.mysql_secret配置MySQL登录密码
// 获取MySQL安装时生成的随机密码 为BEYNx9iL0GJGRu0t
[root@iZbp1c36ego5can8kprgpoZ MySQL-5.6.35]# cat /root/.mysql_secret
# The random password set for the root user at Wed Mar 8 22:14:41 2017 (local time): BEYNx9iL0GJGRu0t
[root@iZbp1c36ego5can8kprgpoZ MySQL-5.6.35]#
service mysql start # 启动MySQL服务
mysql -uroot -p # 进入MySQL,
使用之前获取的随机密码
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypassword');
// 在MySQL命令行中设置root账户的密码为mypassword
quit # 退出MySQL命令行
4.安装nginx
安装make:
yum -y install gcc automake autoconf libtool make
安装g++:
yum install gcc gcc-c++
PCRE库:
yum install pcre pcre-develzlib库:
yum install zlib zlib-devel
OpenSSL:
yum install openssl openssl-devel
下载Nginx:
Nginx源代码包可以从官方网站下载http://nginx.org/en/download.html,目前最新稳定版本为1.10.1,还有开发版本可供选择。相关命令如下:
wget https://nginx.org/download/nginx-1.10.1.tar.gz
tar -xzxf nginx-1.10.1.tar.gz
cd nginx-1.10.1/
make
make install
5.安装memcached缓存服务
[root@iZbp1c36ego5can8kprgpoZ src]# yum install memcached(安装)
Complete!
[root@iZbp1c36ego5can8kprgpoZ local]# memcached -h(验证安装)
[root@iZbp1c36ego5can8kprgpoZ local]# chkconfig --level 2345 memcached on(设置开机启动)
[root@iZbp1c36ego5can8kprgpoZ local]# vi /etc/sysconfig/memcached (配置memcached)
PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS=""
[root@iZbp1c36ego5can8kprgpoZ local]# ls
aegis bin etc games include lib lib64 libexec nginx sbin share src
[root@iZbp1c36ego5can8kprgpoZ local]# ps -ef|grep memcached
root 17813 17740 0 10:04 pts/1 00:00:00 grep memcached
[root@iZbp1c36ego5can8kprgpoZ local]# service memcached start(启动memcached)
Starting memcached: [ OK ]
[root@iZbp1c36ego5can8kprgpoZ local]#
6.安装配置jdk