阿里雲+LAMP環境配置

1. 準備好一鍵Linux環境的腳本:mysql

http://dwz.cn/6Nlexmsql


2. 運行命令:
# yum install lynx tree nmap sysstat lrzsz dos2unix -y zip unzip
# yum upgrade openssl bash -y
# rz
# chmod u+x -R sh-1.4.5
# cd sh-1.4.5
# ./install.shshell

#vim /.../httpd.confvim

LoadModule vhost_alias_module modules/mod_vhost_alias.so //去掉註釋

# vim /etc/ssh/sshd_configbash

Port 17091 //默認是22端口

# service sshd restartssh

# vim /etc/sysconfig/networkide

hostname=XXX //XXX改爲想要顯示的名稱

# rebootspa

 

3. 修改root密碼:
# passwd root3d

 

4. 設置www目錄的權限:定時器unix

# mkdir /alidata/shell
# cd /alidata/shell/
# vi www_chown.sh

#!/bin/bash
chown -R www.www /alidata/www/

# chmod u+x www_chown.sh

# /etc/init.d/crond status
# crontab -l
# crontab -e

*/1 * * * * /alidata/shell/www_chown.sh

 

5. 設置mysql:
# mysql -uroot -p

mysql> use mysql;
mysql> drop user root@'%';
mysql> create user 'mysqlaa'@'%' identified by 'mypass';
mysql> select host,user,password from user;
mysql> grant select,update,insert,delete on *.* to mysqlaa@'%' identified by "mypass";
mysql> flush privileges;

 

6. 設置SecureCRT,

 

 

 

 

 

 

;

相關文章
相關標籤/搜索