easypanel(CentOS6.x)升级MySQL版本5.1到5.6

  • rpm -ivh http://github.itzmx.com/1265578519/repo/master/CentOS/mysql-community-release-el6-5.noarch.rpm
  • rm -rf /etc/yum.repos.d/mysql-community.repo
  • rm -rf /etc/yum.repos.d/mysql-community-source.repo
  • wget http://github.itzmx.com/1265578519/repo/master/CentOS/mysql-community.repo -O /etc/yum.repos.d/mysql-community.repo
  • wget http://github.itzmx.com/1265578519/repo/master/CentOS/mysql-community-source.repo -O /etc/yum.repos.d/mysql-community-source.repo
  • yum -y update
  • yum -y install mysql mysql-server
  • yum localinstall mysql-community-release-el6-5.noarch.rpm
  • yum install mysql-community-server
  • rm -rf /var/lib/mysql/ibdata1
  • rm -rf /var/lib/mysql/ib_logfile0
  • rm -rf /var/lib/mysql/ib_logfile1
  • service mysqld restart
  • chkconfig –level 2345 mysqld on
  •  

    确认版本信息:

    [root@west195246 bin]# mysql -V
    mysql  Ver 14.14 Distrib 5.6.20, for Linux (x86_64) using  EditLine wrapper

    最后请修改/etc/my.cnf为mysql5.6的版本,如果升级还是以前5.1的,不通用,可能会导致一些未知问题

    官方文档:http://dev.mysql.com/doc/refman/ … efault-changes.html

    1. vi /etc/my.cnf

    复制代码

     

    1. # For advice on how to change settings please see
    2. # http://dev.mysql.com/doc/refman/ … ation-defaults.html

    3. [mysqld]
    4. #
    5. # Remove leading # and set to the amount of RAM for the most important data
    6. # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
    7. innodb_buffer_pool_size = 8M
    8. #
    9. # Remove leading # to turn on a very important data integrity option: logging
    10. # changes to the binary log between backups.
    11. # log_bin
    12. #
    13. # Remove leading # to set options mainly useful for reporting servers.
    14. # The server defaults are faster for transactions and fast SELECTs.
    15. # Adjust sizes as needed, experiment to find the optimal values.
    16. join_buffer_size = 8M
    17. sort_buffer_size = 2M
    18. read_rnd_buffer_size = 2M
    19. datadir=/var/lib/mysql
    20. socket=/var/lib/mysql/mysql.sock
    21. log-bin
    22. skip-networking
    23. default-time-zone = ‘+8:00’
    24. performance_schema_max_table_instances=200
    25. table_definition_cache=200
    26. table_open_cache=128

    27. # Disabling symbolic-links is recommended to prevent assorted security risks
    28. symbolic-links=0

    29. # Recommended in standard MySQL setup
    30. sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

    31. [mysqld_safe]
    32. log-error=/var/log/mysqld.log
    33. pid-file=/var/run/mysqld/mysqld.pid

    复制代码

     

    1.增加配置项,重启

    1. vi /etc/my.cnf

    复制代码





    [mysqld]

    performance_schema=on


    1. service mysqld restart

    复制代码





    2.SSH运行命令升级

    mysql_upgrade -uroot -p数据库密码

     

     

    参考小樱之数据库升级

    CentOS6安装LAMP(Apache/MySQL/PHP)环境搭建教程

    转自老左

     

    第一步、安装和配置Apache服务器

    yum update
    yum install httpd

    安装当前版本的Apache配置环境,然后配置httpd.conf(位置在/etc/httpd/conf/httpd.conf)文件,一般如何类似Linode 1GB方案可以这样的设置,也可以默认。

    KeepAlive Off
    ……
    < IfModule prefork.c>
    StartServers 2
    MinSpareServers 6
    MaxSpareServers 12
    MaxClients 80
    MaxRequestsPerChild 3000
    < /IfModule>

    配置的时候不是要把里面设置都删除,而是对应的参数修改。

    第二步、设置、绑定站点目录文件

    手工安装LAMP不同于用一键包直接用命令就可以添加域名建立站点,这些所有都要用手工操作,比如我们这里需要添加域名建立站点。

    /etc/httpd/conf.d/vhost.conf

    在上述的目录下建立vhost.conf文件,然后配置站点

     

    NameVirtualHost *:80

    <VirtualHost *:80>
     ServerAdmin rocky@rocky.hk
     ServerNametest.rocky.hk
     ServerAlias test.rocky.hk
     DocumentRoot /srv/www/test.rocky.hk/public_html/
     ErrorLog /srv/www/test.rocky.hkg/logs/error.log
     CustomLog /srv/www/test.rocky.hkg/logs/access.log combined
     </VirtualHost>

    <VirtualHost *:80>
     ServerAdmin admin@idcxen.com
     ServerNameidcxen.com
     ServerAlias www.idcxen.com
     DocumentRoot /srv/www/idcxen.com/public_html/
     ErrorLog /srv/www/idcxen.com/logs/error.log
     CustomLog /srv/www/idcxen.com/logs/access.log combined
     </VirtualHost>

    我们在上面文件中可以看到是添加2个站点,如果是添加多个站点类似的复制修改对应的目录。同样的,我们需要对应的目录创建没有的目录路径。

    mkdir -p /srv/www/laozuo.org/public_html
    mkdir /srv/www/laozuo.org/logs

    mkdir -p /srv/www/idcxen.com/public_html
    mkdir /srv/www/idcxen.com/logs

    对应的目录路径比如srv是我创建的,如果有需要其他路径我们根据自己的需要自己创建。

    /etc/init.d/httpd start
    /sbin/chkconfig –levels 235 httpd on
    /etc/init.d/httpd reload

    启动httpd以及设置开机启动。

    第三步、安装MYSQL数据库

    A – 安装并且启动

    yum install mysql-server #安装MYSQL服务

    /sbin/chkconfig –levels 235 mysqld on # 设置开机启动

    /etc/init.d/mysqld start # 启动MYSQL

    B – 设置数据库用户

    mysql_secure_installation #安装设置ROOT权限,根据提示设置ROOT密码

    可以移除默认的其他用户和其他默认数据。

    mysql -u root -p # 登录ROOT数据库用户

    create database laozuo;
    grant all on laozuo.* to ‘laozuouser’ identified by ‘laozuo.org’;

    创建laozuo数据库用户,以及laozuouser数据库用户名,以及laozuo.org数据库密码,这里我们创建之后,后面搭建网站时候需要用到。创建完毕之后输入quit退出。

    第四步、安装PHP环境

    yum install php php-pear

    安装PHP环境,然后配置/etc/php.ini文件。

    error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
    display_errors = Off
    log_errors = On
    error_log = /var/log/php/error.log
    max_execution_time = 30
    memory_limit = 128M
    register_globals = Off
    max_input_time = 30

    用vi寻找上述的几个参数,然后对应进行修改参数,保存退出。

    mkdir /var/log/php
    chown apache /var/log/php

    创建日志文件,如果我们需要支持MYSQL在PHP中,需要输入下面的命令安装php5-mysql包。

    yum install php-mysql
    /etc/init.d/httpd restart

    安装并设置启动。

    这样,我们的域名站点绑定、MYSQL数据库都已经添加,比如我们需要在laozuo.org域名下安装WORDPRESS程序或者其他程序,只需要在/srv/www/laozuo.org/public_html/目录下上传程序,然后利用设置的数据库用户安装就可以了。

    Debian/Ubuntu/Centos 安装NET-SPEEDER并优化

    软件 Github 地址:net-speeder

    安装过程:

    CentOS安装

    wget –no-check-certificate https://gist.github.com/LazyZhu/dc3f2f84c336a08fd6a5/raw/d8aa4bcf955409e28a262ccf52921a65fe49da99/net_speeder_lazyinstall.sh

    sh net_speeder_lazyinstall.sh

    安装完毕后再敲入:

    nohup /usr/local/net_speeder/net_speeder venet0 "ip" >/dev/null 2>&1 &

    注意这里引号中的IP不需要动,有的地方说需要改成自己的IP地址,其实不用改!

    关闭net_speeder:

    killall net_speeder

    Debian/Ubuntu 一键包

    wget –no-check-certificate https://raw.githubusercontent.com/tennfy/debian_netspeeder_tennfy/master/debian_netspeeder_tennfy.sh

    chmod a+x debian_netspeeder_tennfy.sh

    bash debian_netspeeder_tennfy.sh

    来自 Tennfy

    查看 net-speeder 是否运行

    ps aux|grep net_speeder|grep -v grep

    停止net-speeder

    killall net_speeder

    启动net-speeder(OPENVZ环境)

    nohup /root/net_speeder venet0 "ip" >/dev/null 2>&1 &

    注:CentOS 下安装需要使用额外的 EPEL源 较麻烦,Github 上有教程,大家可以参看

    1. 安装运行及编译的依赖库

    apt-get install libnet1;apt-get install libpcap0.8;apt-get install libnet1-dev;apt-get install libpcap0.8-dev

    2. 下载源码到 服务器

    cd /var;wget https://github.com/snooda/net-speeder/raw/master/net_speeder.c;wget https://github.com/snooda/net-speeder/raw/master/build.s

    3. 编译

    chmod +x build.sh;./build.sh -DCOOKED

    4. 运行并加入开机启动

    nohup /var/net_speeder eth0 "ip";echo "nohup /var/net_speeder eth0 "ip" >/dev/null 2>&1 &" >> /etc/rc.local

    优化

    由于双倍发包,比较吃流量,也对网络资源造成了高占用,所以我们可以只在高峰拥堵时段开启 net-speeder ,在正常时段关闭它。

    1.设置时区(一般 LNMP 等一键包环境默认已经设置好了的)

    echo "Asia/Shanghai" >/etc/timezone

    2、设置定时开关

    echo ‘0 13 * * * root nohup /root/net_speeder venet0 “ip” >/dev/null 2>&1 &’ >>/etc/crontab

    echo “0 2 * * * root killall net_speeder” >>/etc/crontab

    /etc/init.d/cron restart

    注:根据我经验,一天中当美帝时间过了 24 点后国内访问延时就是飙升,所以我们这里设置是 13点 开启,午夜 2点 关闭。

    注意事项

    以下几种情况不适合使用net-speeder:

    1. 小流量 VPS,因为使用 net-speeder 会消耗双倍流量。
    2. 主要提供网页、图片等小文件访问。net-speeder 对于下载大文件、代理访问视频网站等效果比较好,而对小文件加速效果不明显。
    3. 需要使用 pptpd 等不支持双倍发包的网络软件。net-speeder 会造成这些软件无法正常使用。
    4. 如果线路本身很好,不存在延迟较大情况,使用 net-speeder 效果会适得其反。

    centos 安装qemu

     

     1.安装qemu

    【快速安装:https://pkgs.org/search/qemu

     

    http://wiki.qemu.org/Download中下载关于qemu的源代码压缩文件,并放入/home/qemu中

    本文以qemu-2.1.3为例,具体参考qemu版本

     

    1. yum install -y gcc*  
    2. yum install -y zlib* 
    3. yum install -y glib*
    4. yum install install autoconf automake libtool 

       

    1. cd /home/qemu  
    2. tar -jxvf qemu-2.1.3.tar.bz2  

    进入/home/qemu/qemu-2.1.3中,并进行编译

    2.安装vnc+fluxb

    1. ./configure  
    2. make
    3. make install

    ox

     

    rpm -ivh epel-release-latest-6.noarch.rpm
    yum install -y fluxbox
    yum groupinstall -y "x window system"

     可能还需要rpmforge

     

    3.安装vnc

    yum install tigervnc tigervnc-server -y

    .设置vnc密码

    vncpasswd

    5.配置vnc

    vi /root/.vnc/xstartup

    将内容改为

    #!/bin/sh
    # Uncomment the following two lines for normal desktop:
    # unset SESSION_MANAGER
    # exec /etc/X11/xinit/xinitrc
    [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
    [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
    xsetroot -solid grey
    vncconfig -iconic &
    x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
    #twm &
    #gnome-session &
    exec /usr/bin/fluxbox

    6

    vi /etc/sysconfig/vncservers
     
    
    最后两行加上,然后保存退出
    VNCSERVERS="1:root" VNCSERVE
    RARGS[1]="-geometry 1024x768"

    7.

    chmod +x ~/.vnc/xstartup
    chkconfig vncserver on
    如果VNC无法连接,尝试关闭防火墙 service iptables stop(懒人法)
    添加防火墙端口:
     vi /etc/sysconfig/iptables
    上面我们只添加了一个 root 帐号和桌面 1,所以这里按照上面的规则,添加 “5901以及3389” 端口号即可。
    -A INPUT -m state –state NEW -m tcp -p tcp –dport 5901 -j ACCEPT
    -A INPUT -m state –state NEW -m tcp -p tcp –dport 3389 -j ACCEPT
     (COMMIT之前)
    重启防火墙
    service iptables restart
     

    centos7下搭建lamp(Apache+MySQL+PHP)环境

    一.安装Apache

    1.安装

    yum -y install httpd

    2.开启apache服务

    systemctl start httpd.service

    3.设置apache服务开机启动

    systemctl enable httpd.service

    4.验证apache服务是否安装成功

    在本机浏览器中输入虚拟机的ip地址,CentOS7查看ip地址的方式为:

    ip addr

    (阿里云不需要用这种方式查看,外网ip已经在你主机列表那里给你写出来了的;)

    这里是访问不成功的

    (阿里云用外网访问,能成功,不需要做以下步骤)

    查了资料,说法是,CentOS7用的是Firewall-cmd,CentOS7之前用的是iptables防火墙;要想让外网能访问到apache主目录,就需要做以下的操作:

    firewall-cmd --permanent --zone=public --add-service=http

    firewall-cmd --permanent --zone=public --add-service=https

    firewall-cmd --reload

    然后再访问外网ip,如果看到apache默认的页面–有Testing 123…字样,便是成功安装了apache服务了;

    二.安装PHP

    1.安装

    yum -y install php

    2.重启apache服务

    systemctl restart httpd或者systemctl restart httpd.service

    然后,你可以写一个php文件在浏览器中运行一下了;

    eg:

    vi /var/www/html/info.php

    i

    <?php phpinfo(); ?>

    Esc

    :wq

    然后,在自己电脑浏览器输入 192.168.1.1/info.php

    运行,会出现php的一些信息

    三.安装MySQL

    我这里根据所学的那个教程,也安装了MariaDB

    1.安装

    yum -y install mariadb-service mariadb

    2.开启MySQL服务

    systemctl start mariadb.service

    3.设置开机启动MySQL服务

    systemctl enable mariadb.service

    4.设置root帐户的密码

    mysql_secure_installation

    然后会出现一串东西,可以仔细读一下,如果你懒得读,就在提示出来的时候,按Enter就好了,让你设置密码的时候,你就输入你想要的密码就行,然后继续在让你选择y/n是,Enter就好了;当一切结束的时候,你可以输入mysql -uroot -p的方式,验证一下;

    四、将PHP和MySQL关联起来

    yum search php,选择你需要的安装:yum -y install php-mysql

    五、安装常用的PHP模块

    例如,GD库,curl,mbstring,…

    1.安装:

    yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel

    2.重启apache服务

    systemctl restart httpd.service

    然后,再次在浏览器中运行info.php,你会看到安装的模块的信息;

    至此,LAMP环境就搭建好了。

    从你的全世界路过:爱情是让你笑

    从你的全世界路过:爱情是让你笑

     故事的开头总是这样,适逢其会,猝不及防。故事的结局总是这样,花开两朵,天各一方。

                                                                                                                           ——张嘉佳《从你的全世界路过》

     

    .  喜欢她,就信任她,对她好

        茅十八,平时沉默少语,但为了荔枝开车不那么无聊,他捣鼓了一个多月,把僵硬呆板的导航仪语音文件换成了荔枝一人的茅十八版话唠搞笑调皮语音文件。荔枝听着语音,笑得花枝乱颤。

        喜欢你,就逗你笑。

        猪头,是剧中另一个主人公。当学校海报栏张贴出崔敏盗窃宿舍同学人民币两千元的事时,全世界只有猪头相信她是被冤枉的。猪头拼命家教、找活儿,想帮崔敏赚够钱,还给那个被盗的女孩儿,以证清白。钱赚到时,那个女孩已经转学了,崔敏哭成泪人,她再也没机会证明自己了。但庆幸的是,有一个人,在他面前,她永远不需要证明自己。

        猪头说:一旦下雨,路上就有肮脏和泥泞,每个人都得踩过去。可是,我有一条命,我愿意努力工作,拼命赚钱,要让这个世界的一切苦难和艰涩,从此再也没有办法伤害到她。

     

    . 成为更好的你,给她最好的爱。

        高考后喜欢上了一个女孩,她明媚,她笑,她是我眼里永远长不大的女孩。 

    因为喜欢她,我会把我微博、微信上遇到的每一个笑话都粘贴在备忘录里,以备不时之需;我用尽自己所能,只要能让她开心,我就乐意;我会找各种她可能喜欢的话题。

        因为喜欢她,我会把她想要的东西都记在备忘录里,随之准备惊喜;

        我会在她需要时,当天买票,火车呼啸,出现在她面前。

        因为她,我满脑的阴郁溃散,学会温暖;因为她,我每天都会告诉自己,你要努力,你要精进,你要一寸且一寸地变得更好.

        但是这一切终究也没有实现。

     

     . 让你笑,对你好,这才是爱情最好的样子。

       茅十八,不愿见荔枝的无聊,以自己独有的方式,让荔枝笑;

       猪头,不乐见崔敏的眼泪,以自己固执的努力,对崔敏好。

       虽然,茅十八和荔枝最终分手了,可是当荔枝听到导航仪里最后的声音,一定会想起那个曾经爱她爱到骨子里的男生。这是他们的青春,在一起,漫天灿烂;不在一起,爱过的盘旋在记忆里,照样是青春时光最为恒远的璀璨。

       不是谁都可以像猪头一样,为了保护自己心爱的她,奋不顾身,执着一念,只想对她好,绝不让她哭。最终,功德圆满,走上礼堂。这样的爱,谁都想要。

        所谓青春一场,就是找到你最爱的她,让她笑,对她好,不管结局,只求在自己生命的某一段时光,热烈夺目,此生不忘。来日回首,告诉自己,那才是真正的爱情。

     

     

    . 爱情,那是一份对自己心爱的人的一份责任。

        此前看到过一篇文章,有几句说的很好。

        “恋爱时,爱情就是两个人在一起去做任何事。只要是你,就好。哪怕顶着冬雪,吱吱呀呀地压马路,揽腰一抱,额头一吻,你笑了,这世界就浪漫得一塌糊涂。不必寻求多大的刺激和巅峰体验,就是一顿饭,也可以吃出爱情电影般的质感。

        分手时,爱情像火锅店里的鸳鸯锅,一半热辣,一半清淡。火辣辣的眼泪,流过了,一切归于清淡。这清淡里满载回忆,也满含期待。那个影子散了,也就散了。不怨不恨,不悔不怒,我不祝福你,你不惦记我,天涯有路,各自相安。

        单身期,对可能到来的爱情,唯一的正确态度就是:负责任。负起自己的责任,于身体健康,于事业精进,于性情更懂得转圜体谅。她一来,你是最好的你,爱情一瞬间,就是最美的样子。

        爱情的美好的面具能比一个善良合适的人更有分量吗?总有一天我们都会懂得取舍。或许现在还没到时候罢了。

        麻木地对对方好,向对方妥协,会让你变得随手可得,变得不值得被珍惜。感情是消耗品,用一次少一次,把最好的自己留给最好的她,逗她笑,对她好。

       

     

    Linux OpenVPN 一键自动安装脚本

     

    【下载对应软件】
    根据你VPS的系统,下载对应的软件,下载页面为:https://openvpn.net/index.php/access-server/download-openvpn-as-sw.html。
    唔,发现上面的地址需要爬墙方能打开,在下面列一些常见系统的软件下载地址:
    CentOS 5 32bit:http://swupdate.openvpn.org/as/openvpn-as-1.8.4-CentOS5.i386.rpm
    CentOS 5 64bit:http://swupdate.openvpn.org/as/openvpn-as-1.8.4-CentOS5.x86_64.rpm
    Ubuntu 10 32bit:http://swupdate.openvpn.org/as/openvpn-as-1.8.4-Ubuntu10.i386.deb
    Ubuntu 10 64bit:http://swupdate.openvpn.org/as/openvpn-as-1.8.4-Ubuntu10.amd_64.deb
    Ubuntu 10 对应 Debian 6 系统;其他的自行打开上面页面下载。
    【软件安装命令】
    Debian和Ubuntu软件安装命令:dpkg -i openvpn-as-1.8.4-Ubuntu10.i386.deb
    CentOS软件安装命令:rpm -ivh openvpn-as-1.8.4-CentOS5.i386.rpm
    【Wget下载和安装】
    Wget之类的下载软件,然后用上面的安装命令安装即可。CentOS 5 64bit的安装示例:
    1.wget http://swupdate.openvpn.org/as/openvpn-as-1.8.4-CentOS5.x86_64.rpm
    2.rpm -ivh openvpn-as-1.8.4-CentOS5.x86_64.rpm
    3.passwd openvpn
    上面最后一条命令用于设置openvpn帐户的密码,输入2遍。
    【管理页面,配置】
    安装成功之后,会自动打印OpenVPN的管理地址,和客户端登录地址:
    https://ip:943/admin/
    https://ip:943/
    首先访问https://ip:943/admin/,用户名为openvpn,密码则是下载之后设置的密码。
    首先左侧,User Management下面的User Permissions,在openvpn用户名的右侧,有个Allow Auto-login的选项,勾选上。

    之后点击下面的Save Settings;当然可以自行添加另外的用户名,但是2个用户的限制,貌似就毫无必要了。

     

    Install OpenVPN on a NAT Server

    In this guide we will cover how to install OpenVPN on a NAT based VPS.



    Now we have a new NAT VPS, details listed below:



    Product: LDN-128

    Hypervisor: ldn6-uk

    OS: CentOS 6 x64 Minimal



    Hostname: ldnNATinstance

    Main IP: 192.168.43.243

    Shared IP: (see above)


    IP Addresses Assigned2a06:8ec0:0000:068e:0000:0000:0000:0001


    Connect to your VM and Update

    Now from this we can check the external IPv4 to connect and open a SSH window.



    Once SSH is open update the OS – “yum update”


    yum update command


    Enable TUN/TAP

    To enable TUN/TAP login to the VPS management panel with your user details and then open the instance you wish to edit.


    Management Screen



    Once the main VPS page has loaded click “VPS Configuration” and then enable TUN/TAP and click submit, once the changes have been successfully applied you can close the prompt window.


    VPS Configuration



    Now TUN/TAP has been configured we restart the VM from the panel to ensure changes take effect.


    TUN/TAP Config View



    Press Stop/Start in the current control panel view.



    Start/Stop VPS

    Install OpenVPN

    Login as root and run “wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh”



    In our case we want openVPN to listen on 24319 as this is one of our assigned ports (24300-24320) so we use the following setup:


    nat-openvpn-setup-screenshot



    We then enter our external/shared IPv4.


    OpenVPN IP NAT Setup


    Access OpenVPN

    Now the server is configured we can access it.



    Then use sFTP/SSH/rsync to download the config file.


    OpenVPN NAT sFTP Download example.ovpn



    Once you have downloaded the config file load it into the OpenVPN client then… Connect!


    Success - Connected to OpenVPN


    Secure Your Server

    We would advise all system administrators to secure your new server once configured.


    Steps such as SSH keys, configuration of firewall and general system best practices being deployed.

    Linux OpenVZ Debian 7 32/64bit环境一键安装VNC桌面环境教程

    aptget y purge apache2* bind9* xinetd samba* nscd* portmap sendmail* sasl2bin

    aptget y purge lynx memtester unixodbc python* odbcinst* sudo tcpdump ttf*

    aptget autoremove && aptget clean

     

    apt-get update -y;apt-get upgrade -y;apt-get install nano -y;apt-get install gnome-core flashplugin-nonfree -y;apt-get install vnc4server -y; vncserver; vncserver -kill :8; cd ~; wget http://soft.laozuo.org/vnc/vnc-debian-7.txt -O .vnc/xstartup; mkdir -p /etc/vncserver; echo ‘VNCSERVERS=”8:root”‘ >> /etc/vncserver/vncservers.conf; echo ‘VNCSERVERARGS[8]=”-geometry 1000×700″‘ >> /etc/vncserver/vncservers.conf; cd /etc/init.d/; wget http://soft.laozuo.org/vnc/vnc-init-ubuntu-12.txt -O vncserver; chmod 755 vncserver; update-rc.d vncserver defaults 99; reboot;

     

    Debian 7 32位系统,64位也是支持的。登陆SSH之后,输入上面的脚本回车会自动安装,在过程中会有一个界面弹出来,我们选择对应的标签,回车就可以继续。

    debian-vnc-1

    选择YES,然后继续回车。

    debian-vnc-2

    继续之后会弹出来选择键盘习惯,默认US,然后继续OK回车。最后我们还需要输入两次VNC密码,系统会自动重启。

    第二、登录Debian环境VNC桌面看看效果

    debian-vnc-3

    安装还是比较是顺利的,老左已经成功登录Debian VNC桌面,如果有需要玩的朋友可以也试试吧。到目前为止,短期老左不再更新VNC相关的信息了,感觉更新多了有点不舒服,后面找点其他的内容分享,比如大家有提到WDCP的安全问题,我会继续找国内和为海外的APACHE面板内容更新,适当的时候不一定要选择WDCP面板。

    本文固定链接: http://www.laozuo.org/4954.html | 老左博客