samba安装配置

yum install samba samba-client samba-common

 

修改smb.conf,最好先备份原文件,以防修改不正确导致smb无法执行

vi /etc/samba/smb.conf
 
//配置文件
 
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = centos
security = user
map to guest = bad user
dns proxy = no
#============================ Share Definitions ==============================  
[dev]
path = /data/webapp
browsable =yes
writable = yes   
guest ok = yes
 
//配置文件结束
 
systemctl enable smb.service
systemctl restart smb.service //samba重启

 

修改防火墙

firewall-cmd --permanent --zone=public --add-service=samba
firewall-cmd --reload
vi /etc/selinux/config

修改 SELINUX=permissive

重启reboot

 

 

右键我的电脑,创建映射其网络驱动器(A:) 

win通过\\虚拟机ip 访问看是否能够访问

 

添加映射文件

 

注意映射文件地址为   \\虚拟机ip\dev

 

 

docker run --privileged=true -it --name=php_dev_v2 -v /data/webapp:/data/webapp -p 80:80 192.168.1.xxx:xx/php7:v1.2 /etc/rc.local

docker安装以及PHP开发环境的配置

 

修改docker里面的php.ini中的为yaf.library="/data/webapp/yafext/"
netstat -tunlp |grep 9000
停止进程kill 19
/usr/local/php-7.0.2/sbin/php-fpm
修改/usr/local/nginx/sbin/nginx
重启niginx服务
/usr/local/nginx/sbin/nginx -s reload
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
/usr/local/php/bin/phpize
将cd /usr/local/nginx/conf/sites cp demo.domain.com.conf xxx.domain.com.conf
vi xxxx.domain.com.conf
修改为:server {
        listen 80;
        server_name xx.xx.com;
        root /data/webapp/xx/[根目录];

 

===========================================


./configure --with-php-config=/usr/local/php/bin/php-config 
--prefix=/usr/local/libmemcached --with-memcached
sudo make 
sudo make install
/etc/init.d/php-fpm
tar -zxvf
http://192.168.1.xx/yaf/index/test/index
cp /usr/local/php-5.5/etc/php-fpm.conf.default php-fpm.conf

./configure --prefix=/usr/local/php-7.0  --enable-fpm --enable-soap --with-libxml-dir --with-openssl --with-mcrypt --with-mhash --with-pcre-regex --with-sqlite3 --with-zlib --enable-bcmath --with-iconv --with-bz2 --enable-calendar --with-curl --with-cdb --enable-dom --enable-exif --enable-fileinfo --enable-filter --with-pcre-dir --enable-ftp --with-gd --with-openssl-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-json --enable-mbstring --disable-mbregex --disable-mbregex-backtrack --with-libmbfl --with-onig --enable-pdo --with-pdo-mysql --with-zlib-dir --with-pdo-sqlite --with-readline --enable-session --enable-shmop --enable-simplexml --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-libxml-dir --with-xsl --enable-zip --enable-mysqlnd-compression-support --with-pear

 

加入容器id为:1234567890

 

查看正在运行的容器:

docker ps

 

查看曾经运行过的容器:

docker ps -a

 

启动已经存在的容器:

docker start 1234567890

 

进入正在运行容器的bash界面:

docker exec -it 1234567890 /bin/bash

 

进入正在运行容器的bash界面,并启动nginx和php,然后进入bash界面:

docker exec -it 1234567890 /etc/rc.local

 

*开启防火墙限制的端口

firewall-cmd --zone=public --add-port=80/tcp --permanent

 

*新建docker容器(--name 取别名; -p 指定本地端口对应容器的端口)

docker run -it -d --name=yafdemo -v /etc/localtime:/etc/localtime:ro -v /data/webapp/www:/data/webapp/www:Z -p 83:80 10.5.3.xx:xx/php7:v1.7 /etc/rc.local

 

删除容器:

docker rm 1234567890