自动化运维平台搭建(一)「建议收藏」

自动化运维平台搭建(一)「建议收藏」自动化运维平台搭建(一)。喜欢的就赞我吧,这样我才有动力继续分享额,带你建立一个强大的自动运维平台

大家好,又见面了,我是你们的朋友全栈君。

第一章            walle搭建部署

环境: centos 5.6

                   1. 首先安装nginx (这里就不写安装过程了,百度搜吧)

                   2. 安装mysql 

                 创建数据库walle

                   3. 安装php5.4版本以上

              卸载旧版本5.3.8 php

                   yum remove php  php-bcmath php-cli php-common  php-devel php-fpm    php-gd php-imap  php-ldap php-mbstring php-mcrypt php-mysql   php-odbc   php-pdo   php-pear  php-pecl-igbinary  php-xml php-xmlrpc

              更新源

               rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm

           安装新版本5.5php

           yum -y install php55w  php55w-bcmath php55w-cli php55w-common  php55w-devel php55w-fpm    php55w-gd php55w-imap  php55w-ldap php55w-mbstring php55w-mcrypt php55w-mysql   php55w-odbc   php55w-pdo   php55w-pear  php55w-pecl-igbinary  php55w-xml php55w-xmlrpc php55w-opcache php55w-intl php55w-pecl-memcache

               4. 下载walle包 (这里我放在我云盘了,避免以后数据地址又找不到)

                 下载链接:   https://yunpan.cn/c6dNYstqBTPRa             分享码: d99d

              5. 设置数据库连接, smtp发送邮件连接

vi config/local.php +14
'db' => [             'dsn'       => isset($_ENV['WALLE_DB_DSN'])  ? $_ENV['WALLE_DB_DSN']  : 'mysql:host=127.0.0.1;dbname=walle',             'username'  => isset($_ENV['WALLE_DB_USER']) ? $_ENV['WALLE_DB_USER'] : 'root',             'password'  => isset($_ENV['WALLE_DB_PASS']) ? $_ENV['WALLE_DB_PASS'] : '数据库密码',         ],

‘mail’ => [

            ‘transport’ => [

                ‘host’       => isset($_ENV[‘WALLE_MAIL_HOST’]) ? $_ENV[‘WALLE_MAIL_HOST’] : ‘smtp.exmail.qq.com’,     # smtp 发件地址

                ‘username’   => isset($_ENV[‘WALLE_MAIL_USER’]) ? $_ENV[‘WALLE_MAIL_USER’] : ‘zhoujiuyang@isoffice.cn’,  # smtp 发件用户名

                ‘password’   => isset($_ENV[‘WALLE_MAIL_PASS’]) ? $_ENV[‘WALLE_MAIL_PASS’] : ‘xxxxxxxx’,       # smtp 发件人的密码

                ‘port’       => isset($_ENV[‘WALLE_MAIL_PORT’]) ? $_ENV[‘WALLE_MAIL_PORT’] : 25,                       # smtp 端口

                ‘encryption’ => isset($_ENV[‘WALLE_MAIL_ENCRYPTION’]) ? $_ENV[‘WALLE_MAIL_ENCRYPTION’] : ‘tls’,                    # smtp 协议

            ],

               6. 
安装composer,如果已安装跳过

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer # PATH目录

注: 为了保证链接以后失效。我传到网盘啦。 地址https://yunpan.cn/c6didZ64eK3Fn  分享码:  65de               7. 
安装vendor

cd walle-web
composer install --prefer-dist --no-dev --optimize-autoloader -vvvv


可能安装不成功。没关系,你直接下载vendor 解压到walle-web目录下 (对了我上面walle-web的项目里面已经包含vendor了,你可以不用再安装)。 
                    8. 初始化项目

cd walle-web
./yii walle/setup # 需要你的yes


                    9. nginx配置
http {

    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  ‘$remote_addr – $remote_user [$time_local] “$request” ‘
                      ‘$status $body_bytes_sent “$http_referer” ‘
                      ‘”$http_user_agent” “$http_x_forwarded_for”‘;

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
    server
    {

    listen 80;
    server_name 192.168.1.36;
        root /root/test/walle-web/web;
        index index.php;
        location / {

                try_files $uri $uri/ /index.php$is_args$args;
        }
        location ~ .*\.php?$
        {

        try_files $uri = 404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass  localhost:8000;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_index index.php;
        include fastcgi.conf;
        include        fastcgi_params;
        }
   }
 }



注: 对了你要启动php-fpm, php-cgi额。 启动方法
# service php-fpm start
# /usr/bin/php-cgi -b 127.0.0.1:8000 -c /etc/php.ini
另外保证/etc目录下存在/etc/php-fpm.conf.  默认路径你可以find / -name php-fpm.conf找下,再copy也行。下面是我系统的。[root@WebServer config]# cat /etc/php-fpm.conf

;;;;;;;;;;;;;;;;;;;;;

; FPM Configuration ;

;;;;;;;;;;;;;;;;;;;;;

; All relative paths in this configuration file are relative to PHP’s install

; prefix.

; Include one or more files. If glob(3) exists, it is used to include a bunch of

; files from a glob(3) pattern. This directive can be used everywhere in the

; file.

include=/etc/php-fpm.d/*.conf

;;;;;;;;;;;;;;;;;;

; Global Options ;

;;;;;;;;;;;;;;;;;;

[global]

; Pid file

; Default Value: none

pid = /var/run/php-fpm/php-fpm.pid

; Error log file

; Default Value: /var/log/php-fpm.log

error_log = /var/log/php-fpm/error.log

; Log level

; Possible Values: alert, error, warning, notice, debug

; Default Value: notice

;log_level = notice

; If this number of child processes exit with SIGSEGV or SIGBUS within the time

; interval set by emergency_restart_interval then FPM will restart. A value

; of ‘0’ means ‘Off’.

; Default Value: 0

;emergency_restart_threshold = 0

; Interval of time used by emergency_restart_interval to determine when

; a graceful restart will be initiated.  This can be useful to work around

; accidental corruptions in an accelerator’s shared memory.

; Available Units: s(econds), m(inutes), h(ours), or d(ays)

; Default Unit: seconds

; Default Value: 0

;emergency_restart_interval = 0

; Time limit for child processes to wait for a reaction on signals from master.

; Available units: s(econds), m(inutes), h(ours), or d(ays)

; Default Unit: seconds

; Default Value: 0

;process_control_timeout = 0

; Send FPM to background. Set to ‘no’ to keep FPM in foreground for debugging.

; Default Value: yes

daemonize = yes

;;;;;;;;;;;;;;;;;;;;

; Pool Definitions ;

;;;;;;;;;;;;;;;;;;;;

; See /etc/php-fpm.d/*.conf

   好啦。 启动nginx服务吧。 访问http://ip

自动化运维平台搭建(一)「建议收藏」

默认用户名为admin 密码admin.


自动化运维平台搭建(一)「建议收藏」


接下来就是把项目和walle 结合起来。下一章节继续。


版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/145719.html原文链接:https://javaforall.net

赞 (0)
全栈程序员-站长的头像全栈程序员-站长

相关推荐

  • android系统签名工具,android应用实现重启系统+签名「建议收藏」

    android系统签名工具,android应用实现重启系统+签名「建议收藏」1.在AndroidManifest.xml文件的manifest标签中加入一条android:sharedUserId=”android.uid.system”package=”com.ipanel.update”android:versionCode=”1″android:versionName=”1.0″android:sharedUserId=”android.uid.system”&g…

    2022年6月21日
  • pytorch MSELoss参数详解「建议收藏」

    pytorch MSELoss参数详解「建议收藏」pytorchMSELoss参数详解importtorchimportnumpyasnploss_fn=torch.nn.MSELoss(reduce=False,size_average=False)a=np.array([[1,2],[3,8]])b=np.array([[5,4],[6,2]])input=torch.autograd.Variable(to…

    2022年9月18日
  • Java SSM练手小项目-手把手带你搭建一个基于SSM框架的人力资源管理后台系统

    Java SSM练手小项目-手把手带你搭建一个基于SSM框架的人力资源管理后台系统前言相信很多小伙伴在学习完SSM三大架构以后,不知道该如何找到一个简单容易上手的项目进行实战训练,经常在博客上看到一个不错的项目下载下来以后全部都是代码,无处下手。因此本文力求以最简单易懂的项目结构和代码搭建一个还较为完整(即从登录到退出的整个流程)的后台系统。(适合新手)整个项目的操作流程动态图如下(由于CSDN对上传图片大小有限制,这里录制的gif画面很不清晰,点击图片查看更清晰):…

    2022年6月15日
  • Anaconda 环境变量手动设置(详细)

    问题Win键+r打开运行对话框,输入cmd回车输入conda,显示:‘conda’不是内部或外部命令,也不是可运行的程序或批处理文件。主要原因是因为安装anaconda时,不是自动选择为添加到环境变量原因导致的。只要你知道这个怎么环境设置了,一般遇到类似的问题也就可以自己解决了。(比如python的安装)第一步打开控制面板,进入所有控制面板项,再进入系统,选择高级系统设置。第二步进入高级,点击环境变量。第三步在系统变量区域内选择Path,双击。第四步点击新建。第五步

    2022年4月4日
  • 在线写java代码

    在线写java代码前言蓦然回首自己做开发已经十年了,这十年中我获得了很多,技术能力、培训、出国、大公司的经历,还有很多很好的朋友。但再仔细一想,这十年中我至少浪费了五年时间,这五年可以足够让自己成长为一个优秀的程序员,可惜我错过了,我用这五年时间和很多程序员一样在困惑和迷茫中找不到出路!路其实一直都在那里,只是我们看不到而已!以前我一直被公司和技术牵着走,并不是自己在选择技术,而是不自觉地被推到了这个位置上。想想有多少人对于自己将来要从事的职业和技术类型进行过深入思考和比较呢?当我跳出编码后,我开始思考和程序及程序员职

    2022年7月8日
  • 16G kingston U盘 解除写保护[通俗易懂]

    16G kingston U盘 解除写保护[通俗易懂]前些天买的16Gkingstonu盘忽然有了写保护,但是拆开u盘又没有看到有写保护开关。纠结加郁闷。然后一天后又忽然发生了电脑无法识别U盘,连盘符也读不出来了。里面好多资料全无,彻底让我伤心了,

    2022年9月10日

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号