• 我的linux环境


    apache2+php+mysql

    sudo apt-get install apache2
    sudo apt-get install libapache2-mod-php5 php5
    sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
    sudo apt-get install mysql-server mysql-client
    sudo apt-get install phpmyadmin
    sudo vim /etc/apache2/sites-enabled/000-default.conf
    #加入
    DocumentRoot /home/inu1255/web
    ScriptAlias /cgi-bin/ /var/www/html/cgi-bin/
    #:wq 保存并退出
    sudo vim /etc/apache2/apache2.conf
    #/var/www/html 换成 /home/inu1255/web
    #:wq 保存并退出
    sudo a2enmod cgi
    sudo /etc/init.d/apache2 restart
    mkdir ~/web
    sudo ln -s /usr/share/phpmyadmin ~/web
    sudo /etc/init.d/apache2 restart
    

    apache2+django

    # 安装django
    sudo apt-get install python-setuptools
    sudo easy_install django
    # 安装wsgi
    sudo apt-get install libapache2-mod-wsgi
    # 新建一个django项目
    django-admin.py startproject mysite
    mkdir mysite/apache
    vim mysite/apache/diango.wsgi
    # 写入
    ############# diango.wsgi ##################### start
    import os
    import sys
    path = '/var/www/mysite' #刚刚新建的mysite的路径
    if path not in sys.path:
        sys.path.append(path)
    os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' #mysite的配置文件
    from django.core.wsgi import get_wsgi_application
    application = get_wsgi_application()
    ############################################### end
    sudo vim /etc/apache2/apache2.conf
    # 加入
    ################ apache2.conf ##################### start
    <Directory /var/www/django/hello>
            Order allow,deny
            Allow from all
    </Directory>
    WSGIScriptAlias /mysite /var/www/mysite/apache/django.wsgi #django.wsgi的路径
    ################################################### end
    sudo /etc/init.d/apache2 restart
    

    django.wsgi 用来启动django项目

    import os
    import sys
    
    path = '/var/www/mysite' #刚刚新建的mysite的路径
    
    if path not in sys.path:
        sys.path.append(path)
    os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' #mysite的配置文件
    
    from django.core.wsgi import get_wsgi_application
    application = get_wsgi_application()
    
    

    java

    sudo apt-get purge openjdk*
    sudo apt-get install software-properties-common
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java7-installer
    

    mongo

    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
    echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
    sudo apt-get update
    sudo apt-get install mongodb-10gen
    
    apt-get install php-pear php5-dev make
    pecl install mongo
    echo "extension=mongo.so" >> /etc/php5/apache2/php.ini
    service apache2 restart
    
    

    sbt

    echo "deb http://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
    sudo apt-get update
    sudo apt-get install sbt
    
    addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "3.0.0")
    

    goagent

    sudo apt-get install python-dev python-greenlet python-gevent python-vte python-openssl python-crypto python-appindicator
    

    sublime

    # ctrl+`
    import urllib2,os,hashlib; h = '2deb499853c4371624f5a07e27c334aa' + 'bf8c4e67d14fb0525ba4f89698a6d7e1'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')
    
    #Package setting => Package Contral => setting-user
    	"installed_packages":
    	[
    		"Alignment",
    		"BracketHighlighter",
    		"DocBlockr",
    		"Emmet",
    		"FileDiffs",
    		"GBK Encoding Support",
    		"jQuery",
    		"JsFormat",
    		"LESS",
    		"Markdown Extended",
    		"Package Control",
    		"SublimeCodeIntel",
    		"SublimeLinter",
    		"Trimmer"
    	]
    
  • 相关阅读:
    C++ 并发编程 01 线程api
    C# CS1591 缺少对公共可见类型或成员的 XML 注释 问题解决
    Web Api HelpPage
    C++11新特性介绍 02
    C++11新特性介绍 01
    Autofac框架详解
    Linux gdb调试器用法全面解析
    BCM_SDK命令
    VLAN
    java_Observer Design Pattern
  • 原文地址:https://www.cnblogs.com/inu1255/p/4259467.html
Copyright © 2020-2023  润新知