首页 技术 正文
技术 2022年11月21日
0 收藏 695 点赞 2,419 浏览 2535 个字

1.Apache

#安装apache软件

yum -y install httpd

#启动httpd服务

service httpd start

#设置开机启动chkconfig –list httpd查看

chkconfig httpd on

#进入配置文件修改服务器名

vi /etc/httpd/conf/httpd.conf
ServerName localhost:80
DirectoryIndexindex.html index.php index.htm

#重启httpd服务

service httpd restart

 

2.centos6.8 yum安装mysql 5.6 (完整)

一、检查系统是否安装其他版本的MYSQL数据
#yum list installed | grep mysql
#yum -y remove mysql-libs.x86_64
二、安装及配置
# wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
# rpm -ivh mysql-community-release-el6-5.noarch.rpm
# yum repolist all | grep mysql
安装MYSQL数据库
# yum install mysql-community-server -y
设置为开机启动(2、3、4都是on代表开机自动启动)
# chkconfig --list | grep mysqld
# chkconfig mysqld on
三、设置远程root
# service mysqld start
设置root密码
# mysql_secure_installation
登陆root账号
# mysql -uroot -p 
建立远程root用户
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '你设置的密码' WITH GRANT OPTION;
mysql> flush privileges;
查看mysql原本编码:
mysql> show variables like 'character%';
设置编码
# vi /etc/my.cnf
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
performance_schema_max_table_instances=400
table_definition_cache=400
table_open_cache=256
# 修改
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION[mysql]
default-character-set = utf8[mysql.server]
default-character-set = utf8[mysqld_safe]
default-character-set = utf8[client]
default-character-set = utf8
重启mysql
# service mysqld restart

再次查看编码:

# mysql -uroot -p
mysql> show variables like 'character%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
rows in set (0.00 sec)

3.PHP

#安装依赖包

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

#安装PHP及相关软件

yum install php70w.x86_64 php70w-opcache.x86_64 php70w-pdo.x86_64 php70w-fpm.x86_64 php70w-mysql.x86_64
yum install php70w-gd.x86_64 libjpeg* php70w-ldap.x86_64 php70w-odbc.x86_64 php70w-pear.noarch php70w-xml.x86_64
yum install php70w-xmlrpc.x86_64 php70w-mbstring.x86_64 php70w-bcmath.x86_64 php-mhash php70w-pecl-redis.x86_64

#启动php-fpm服务

service php-fpm start

 设置环境自动启动:

chkconfig php-fpm on

打开文件后查找内容

//查找内容,n为下一个内容
/你要查找的内容
n

新建目录

mkdir /你的路径/你的路径

修改文件名称

//把当前目录下的file1文件名改成file2,如果该目录下有file2,则覆盖以前的file2文件。
mv file1 file2

删除文件

rm -rf filename

最后,需要在阿里云服务器实例–安全组–添加端口3306和80端口

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,991
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,505
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,349
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,134
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,766
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,844