lamp 部署命令

tar zvxf httpd-2.2.21.tar.gz -C /usr/src

cd /usr/src/httpd-2.2.21/

./configure --prefix=/usr/local/apache --enable-so --enable-rewrite

make && make install

chown 777 /usr/local/apache/htdocs

vim /usr/local/apache/conf/httpd.conf

ServerName www.jiangwenhui.com:80

DocumentRoot "/usr/local/apache/htdocs"

#

<IfModule dir_module>

DirectoryIndex index.html  index.php

cd /usr/local/apache/htdocs/

vim index.php

<?php

phpinfo();

?>

rpm -qa | grep httpd

rpm -e httpd

rpm -e httpd --nodeps

service httpd start

/usr/local/apache/bin/apachectl start

cp -p /usr/local/apache/bin /etc/rc.d/init.d/

cp -p /usr/local/apache/bin/apachectl /etc/rc.d/init.d/

vim /etc/rc.d/init.d/apachectl

#description: apache server

#chkconfig:35 61 61

chkconfig --add  apachectl

chkconfig --list apachectl

service apachectl stop && service apachectl start

vim /var/named/chroot/etc/named.conf

cd  /var/named/chroot/var/named/

cp -p winsnet.com.zone yy02.com.zone

vim yy02.com.zone

vim winsnet.com.zone

service named restart

nslookup www.winsnet.com

vim /etc/resolv.conf

nslookup www.winsnet.com

nslookup www.yy02.com

vim /usr/local/apache/conf/httpd.conf

vim /usr/local/apache/conf/extra/httpd-vhosts.conf

cd /usr/local/apache/htdocs/

mkdir winsnet yy02

cd winsnet/

touch index.html

vim index.html

cd ../yy02

touch index.html

vim index.html

service apachectl stop && service apachectl start

tar zvxf mysql-5.1.60.tar.gz -C /usr/src

cd /usr/src/mysql-5.1.60/

./configure --prefix=/usr/local/mysql

make && make install

PATH=$PATH:/usr/local/mysql/bin

echo $PATH

mkdir -p /var/run/mysqld

useradd -M -s /sbin/nologin mysql

chown -R  mysql /usr/local/mysql/

/usr/local/mysql/bin/mysql_install_db --user=mysql

/usr/local/mysql/bin/mysqld_safe --user=mysql

cp -p /usr/src/mysql-5.1.60/support-files/mysql.server /etc/rc.d/init.d/mysqld

chmod a+x /etc/rc.d/init.d/mysqld

chkconfig --add mysqld

chkconfig --list mysqld

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

netstat -nultp | grep ":3306"

mysqladmin -u root password ‘123456‘

netstat -nultp

kill 13424

netstat -nultp

service mysqld start

mysql -u root -p

mysqldump -u root -p yy02 > /yy02.bak

ls /yy02.bak

mysql -u root -p

mysql -u root -p yy02 < /yy02.bak

mysql -u root -p

tar zvxf php-5.3.8.tar.gz -C /usr/src/

cd /usr/src/php-5.3.8/

./configure --prefix=/usr/local/php --enable-mbstring --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php

make && make install

cp -p php.ini-production /usr/local/php/php.ini

vim /usr/local/apache/conf/httpd.conf

AddType application/x-httpd-php .php

cd /usr/local/apache/htdocs/

touch index.php

vim index.php

service apachectl stop

service apachectl start

vim /usr/local/apache/conf/httpd.conf

tar zvxf phpMyAdmin-3.4.9-all-languages.tar.gz -C /usr/local/

mv /usr/local/phpMyAdmin-3.4.9-all-languages/ /usr/local/apache/htdocs/

cd /usr/local/apache/htdocs/

mv phpMyAdmin-3.4.9-all-languages/ phpmyadmin

cd phpmyadmin/

cp config.sample.inc.php config.inc.php

vim config.inc.php

$cfg[‘Servers‘][$i][‘host‘] = ‘127.0.0.1‘;

service apachectl stop

service apachectl start

service mysqld stop

service mysqld start

时间: 2024-10-06 13:25:12

lamp 部署命令的相关文章

编译LAMP部署动态网站环境

title: 编译LAMP部署动态网站环境 date: 2018-11-08 19:08:41 tags: Linux 服务配置 categories: Linux 服务配置 copyright: true --- LAMP动态网站部署架构是由一套 Linux+Apache+MySQL+PHP 组成的动态网站系统解决方案. 以下配置环境为:Linux=RHEL7 --> Apache=2.4.33 --> MySQL=5.5 --> PHP=7.0 无错误版. 安装准备环境 ◆安装gcc

Lamp部署于三台主机中

本次试验的目的主要是搭建LAMP部署于三台主机中:一台部署Http的,一台部署php-fpm,一台部署MariaDB..部署前准备好三台主机.     客户端发送请求过程:         当客户端发送静态资源请求时,httpd会自行处理.当客户端发送动态资源的请求时.httpd将自己作为反向代理,将请求发送给php-fpm主机,让其进行处理,当请求发送给php-fpm时,如果需要使用导数据时,通过mysql启动(php-mysql)时其与MariaDB通信:当然事先要授权远程登录才行. 一.部

Web基础与HTTP协议(LAMP部署基础知识)

Web基础与HTTP协议 一.前言 前端:(玩的是框架)HTML (超文本标记语言) CSS (层叠样式表) JavaScript js (动态语言交互) JSP(与Java有关,前端未必接触) JavaScriptPage VUE(前后端分离) ECHARTS bootstrap--简洁.直观.强悍的前端开发框架,让web开发更迅速.简单 二.域名概述 域名的概念IP地址不易记忆早期使用Hosts文件解析域名主机名称重复主机维护困难DNS (Domain Name System域名系统)分布式

利用maven命令把maven项目部署到tomcat服务器(部署命令,遇到的问题)

1.1maven命令(部署项目到tomcat的一些常用命令) • mvn tomcat:run or mvn tomcat7:run is deploy to embedded maven tomcat6 or tomcat7 do not need to start tomcat first • mvn tomcat:deploy need to configure that : <groupId>org.codehaus.mojo</groupId> <artifactI

LAMP部署流水

1.安装完成linux系统后,关闭防火墙: [[email protected] ~]# service iptables stop iptables: Setting chains to policy ACCEPT: nat mangle filte[  OK  ] iptables: Flushing firewall rules:                         [  OK  ] iptables: Unloading modules:                   

LAMP部署-- 二.编译安装Mysql

LAMP组件介绍 LAMP是指Linux.Apache,Mysql以及PHP的简称,目前许多生产环境的都是用的LAMP架构,在网络应用和开发环境方面,LAMP组合是非常棒的,它们的结合提供了强大的功能. Linux作为底层的操作系统,提供了灵活且安全的应用平台,为其他的组件稳定运行提供了保障: Apache作为web服务器,提供了功能强大.稳定与支撑能力突出的web平台: Mysql也是一款优秀的数据库软件: PHP是一种开发脚本语言,可以嵌入HTML中,适用于web开发: 准备工作 操作系统:

LAMP部署

必备工具 1:Linux系统 2:Apache服务 3:MySQL服务        (是多线程.多用户的SQL数据库管理系统) 4:PHP        (是一种编程语言最初设计生产动态网站) 安装前的准备 1:安装Apache [[email protected] ~]# tar zxf httpd-2.2.17.tar.gz -C /usr/src/ [[email protected] ~]# cd /usr/src/httpd-2.2.17/ [[email protected] ht

Ansible roles实现LAMP部署wordpress

ansible lamp ansible roles实现lamp安装wordpress 整个role目录的结构: .├── ansible.cfg├── hosts├── httpd-php_roles.retry├── httpd-php_roles.yml├── roles│   ├── httpd│   │   ├── files│   │   │   ├── mysql_wp.sh│   │   │   ├── wordpress-4.7.4-zh_CN.tar.gz│   │   │

LAMP部署脚本--安装篇

#!/bin/bash # By Stranded 2015-08-20 CMA_V=cmake-2.8.6 APA_V=httpd-2.2.15 MYS_V=mysql-5.5.22 LIB_V=libmcrypt-2.5.8 MHA_V=mhash-0.9.9.9 MCR_V=mcrypt-2.6.8 PHP_V=php-5.3.28 apache(){ # 判断是否有RPM方式安装的httpd.httpd-manual软件包,如果有则卸载 if [ $(rpm -qa | grep htt