ssh登陆远程主机
ssh root@IP ssh远程登陆主机命令 root为用户名 IP为需要登陆的主机IP
如 ssh root@123.123.23.23为登陆IP为123.123.23.23的远程主机
1)从http://httpd.apache.org/download.cgi找到最新版下载链接
2)开始安装Apache
cd /usr/local/src
wget http://mirror.bjtu.edu.cn/apache//httpd/httpd-2.2.24.tar.gz
tar -zxvf httpd-2.2.19.tar.gz
cd httpd-2.2.19
./configure --prefix=/usr/local/apache --enable-vhost-alias --enable-rewrite --enable-info --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre
make
make install
.1. 安装apr-1.3.2.tar.gz
# tar zxvf apr-1.3.2.tar.gz
# cd apr-1.3.2
# ./configure
# make
# make install
//apr被安装在/usr/local/apr下
2. 安装apr-util-1.3.2.tar.gz
# tar zxvf apr-util-1.3.2.tar.gz
# cd apr-util-1.3.2
#./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
// --with-apr=/usr/local/apr 指定APR安装路径
# make
# make install
3.安装pcre
//会提示要安装aprapr-util pcre下面是安装步骤
1.安装apr
先到http://apr.apache.org/download.cgi下载apr和apr-util
下载pcre,http://sourceforge.net/projects/pcre
./configure --prefix=/usr/local/pcre
安装完在安装apache就可以了,安装好之后在/usr/local/apache目录下
echo $PATH 打印当前环境变量
export PATH=$PATH:/usr/local/apache/bin/ 添加/usr/local/apache/bin/ 这个目录
yum安装 mysql
#chkconfig mysqld on ← 设置MySQL服务随系统启动自启动
#chkconfig --list mysqld ← 确认MySQL自启动
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off ← 如果2--5为on的状态就OK
远程登录 改权限
mysql> GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
把mysql数据库表user的root的host字段从127.0.0.1改为localhost
就可以在服务器本地登录
改密码
mysql> use mysql;
mysql> update user set password=password("新密码") where user="root";
mysql> flush privileges;