首页 技术 正文
技术 2022年11月14日
0 收藏 870 点赞 4,669 浏览 4893 个字

// 红色加粗是linux命令

安装gcc和gcc-c++yum -y install gcc gcc-c++

yum list httpd*

centOS7.4服务器 yum安装 搭建lamp环境
安装apcheyum -y install httpd.x86_64 httpd-devel.x86_64 httpd-tools.x86_64开启服务/bin/systemctl start httpd.service停止服务/bin/systemctl stop httpd.service设置Apache服务开机启动systemctl enable httpd.service默认目录:/var/www/html/卸载yum remove httpd

安装mysqlhttps://www.cnblogs.com/007sx/p/7083143.html一、检查系统是否安装其他版本的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.rpmyum repolist all | grep mysql安装MYSQL数据库yum install mysql-community-server -y设置为开机启动(2、3、4都是on代表开机自动启动)chkconfig –list | grep mysqld# chkconfig mysqld on三、设置远程root启动mysqlservice 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; 四、设置utf-8编码查看mysql原本编码:mysql> show variables like ‘character%’;mysql> \q设置编码vim /etc/my.cnf如下(少补):[mysqld]character-set-server=utf8 collation-server=utf8_general_ci sql_mode=’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重启mysqlservice mysqld restart再次查看编码:mysql -uroot -pmysql> 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/ |+————————–+—————————-+8 rows in set (0.00 sec)mysql> \q 

安装PHP https://www.cnblogs.com/pangguoming/p/6207970.html1.检查当前安装的PHP包yum list installed | grep php如果有安装的PHP包,先删除他们yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_642 CentOs 7.Xrpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpmrpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 如果想删除上面安装的包,重新安装rpm -qa | grep webstaticrpm -e  上面搜索到的包即可
3.运行yum installyum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64
注:如果想升级到7.0把上面的56w换成70w就可以了。yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64
4.安装PHP FPM,以后需要可以单独安装插件yum install php56w-fpm yum install php70w-fpm

djl补充安装的扩展yum install php56w-xml.x86_64 php56w-xmlrpc.x86_64 php56w-devel.x86_64yum install php56w-bcmath.x86_64 php56w-odbc.x86_64

安装php完成后,重启apache/bin/systemctl restart httpd.service

//查看有哪些可以yum安装的扩展

yum list php56w*Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * webtatic: uk.repo.webtatic.comInstalled Packagesphp56w.x86_64 5.6.35-1.w7 @webtaticphp56w-cli.x86_64 5.6.35-1.w7 @webtaticphp56w-common.x86_64 5.6.35-1.w7 @webtaticphp56w-gd.x86_64 5.6.35-1.w7 @webtaticphp56w-ldap.x86_64 5.6.35-1.w7 @webtaticphp56w-mbstring.x86_64 5.6.35-1.w7 @webtaticphp56w-mcrypt.x86_64 5.6.35-1.w7 @webtaticphp56w-mysql.x86_64 5.6.35-1.w7 @webtaticphp56w-pdo.x86_64 5.6.35-1.w7 @webtaticAvailable Packagesphp56w-bcmath.x86_64 5.6.35-1.w7 webtatic php56w-dba.x86_64 5.6.35-1.w7 webtatic php56w-devel.x86_64 5.6.35-1.w7 webtatic php56w-embedded.x86_64 5.6.35-1.w7 webtatic php56w-enchant.x86_64 5.6.35-1.w7 webtatic php56w-fpm.x86_64 5.6.35-1.w7 webtatic php56w-imap.x86_64 5.6.35-1.w7 webtatic php56w-interbase.x86_64 5.6.35-1.w7 webtatic php56w-intl.x86_64 5.6.35-1.w7 webtatic php56w-mssql.x86_64 5.6.35-1.w7 webtatic php56w-mysqlnd.x86_64 5.6.35-1.w7 webtatic //安装报错php56w-odbc.x86_64 5.6.35-1.w7 webtatic php56w-opcache.x86_64 5.6.35-1.w7 webtatic php56w-pear.noarch 1:1.10.4-1.w7 webtatic php56w-pecl-apcu.x86_64 4.0.11-2.w7 webtatic php56w-pecl-apcu-devel.x86_64 4.0.11-2.w7 webtatic php56w-pecl-gearman.x86_64 1.1.2-1.w7 webtatic php56w-pecl-geoip.x86_64 1.1.1-1.w7 webtatic php56w-pecl-igbinary.x86_64 2.0.5-1.w7 webtatic php56w-pecl-igbinary-devel.x86_64 2.0.5-1.w7 webtatic php56w-pecl-imagick.x86_64 3.4.3-1.w7 webtatic php56w-pecl-imagick-devel.x86_64 3.4.3-1.w7 webtatic php56w-pecl-libsodium.x86_64 1.0.6-1.w7 webtatic php56w-pecl-memcache.x86_64 3.0.8-2.w7 webtatic php56w-pecl-memcached.x86_64 2.2.0-1.w7 webtatic php56w-pecl-mongodb.x86_64 1.4.1-1.w7 webtatic php56w-pecl-redis.x86_64 3.1.6-1.w7 webtatic php56w-pecl-xdebug.x86_64 2.5.5-2.w7 webtatic php56w-pgsql.x86_64 5.6.35-1.w7 webtatic php56w-phpdbg.x86_64 5.6.35-1.w7 webtatic php56w-process.x86_64 5.6.35-1.w7 webtatic php56w-pspell.x86_64 5.6.35-1.w7 webtatic php56w-recode.x86_64 5.6.35-1.w7 webtatic php56w-snmp.x86_64 5.6.35-1.w7 webtatic php56w-soap.x86_64 5.6.35-1.w7 webtatic php56w-tidy.x86_64 5.6.35-1.w7 webtatic php56w-xml.x86_64 5.6.35-1.w7 webtatic php56w-xmlrpc.x86_64 5.6.35-1.w7 webtatic

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