重装ubuntu 14.04记录笔记

来源:互联网 发布:淘宝阿里妈妈在哪里 编辑:程序博客网 时间:2024/06/05 02:20

一、thinkpad实体键

1、用户目录下新建  .touchpad.sh 文件,加入以下内容:

echo 'yourpassword' | sudo -S modprobe -r psmouse&& sudo modprobe psmouse proto=imps

2、打开“启动应用程序”点击添加

名称:touchpad

命令:sh "/home/pangu/.touchpad.sh" 

3、重启后即可。


二、窗口管理器右键中加入“在终端中打开”

1、终端中输入:sudo apt-get install nautilus-open-terminal 
2、重启或终端中输入:nautilus -q 


三、小企鹅输入法

1、终端中输入sudo apt-get install fcitx-table-wbpy

2、系统设置-语言支持-“键盘输入方式系统”选择FCITX。

3、重启

4、桌面右上角键盘图标-配置-“输入法”标签中将多余的输入法删除。


四、安装ZDE

下载ZENDSTUDIO 13,破解文件,序列号

1、解压TAR文件,复制解压出的文件夹到~/sf/ZendStudio (tar zxvf Zend*gz)

2、将破解文件中的JAR文件复制到安装目录~/sf/ZendStudio/plugins/目录中,覆盖同名文件

3、双击~/sf/ZendStudio/ZendStudio,输入序列号,“锁定到启动器”。完成。

4、汉化:

1)百度搜索 Eclipse Babel Project Downloads

2)打开ECLIPSE的官网链接 (http://www.eclipse.org/babel/downloads.php)

3) 找到如下内容:

Installing the language packs

  • Open the install wizard with 'Help' > 'Install new software...'
  • Add the Babel p2 repository: http://download.eclipse.org/technology/babel/update-site/R0.13.0/mars
  • Select/install your language pack of choice
  • Restart Eclipse and you should get a translated Eclipse

第二行的网址就是更新地址。


按上面的说明,打开软件 ,选择‘HELP’  , “Install new sfotware"

把上面第二行的地址复制进去,下一步,下一步按提示安装即可。

TIPS:主要是找到这个网址,然后 得到上面第二行最新的地址。然后软件里更新即可。

这种方式往往要等很久。。。


或是在这个网址下面直接下载包文件,覆盖进安装目录也行。

Babel Language Pack ZipsMars |Luna |KeplerBabel Language Pack Update Site for Mars
http://download.eclipse.org/technology/babel/update-site/R0.13.0/mars
Zipped p2 repository for Mars (114 MB)Babel Language Pack Update Site for Luna
http://download.eclipse.org/technology/babel/update-site/R0.13.0/luna
Zipped p2 repository for Luna (108 MB)Babel Language Pack Update Site for Kepler
http://download.eclipse.org/technology/babel/update-site/R0.13.0/kepler
Zipped p2 repository for Kepler (135 MB)

七、安装APACHE2

1、sudo apt-get install apache2

2、安装完成后更改默认WEB目录

1) sudo vim /etc/apache2/sites-enableds/000-default.conf

将DocumentRoot 后面的路径改成想要的目录路径。例如 DocumentRoot /home/pangu/www

2)sudo vim /etc/apache2/apache2.conf

更改成:

<Directory /home/pangu/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

2个地方要改,一个是默认目录,第二个是把AllowOverride None改成 AllowOverride All , 否则会出403错误。

3)到默认目录位置/home/pangu

sudo chmod -R 755 www

访问LOCALHOST OK。不需要chown也可以正常访问。


重启APACHE:sudo service apache2 restart


八、PHP模块

sudo apt-get install php5 libapache2-mod-php5

安装完成后自动重启APACHE2,如果没有 自动重启,手动重启下。


九、PHP动态编译扩展步骤

1、下载源程序

2、步骤

1)下载PHP源程序,解压后,进入EXT目录

pangu@pangu:~$ cd ~/下载/php-5.6.15/ext

2)执行ext_skel脚本自动创建 相应文件;其中mytest是指定的扩展模块名称。

pangu@pangu:~/下载/php-5.6.15/ext$ ./ext_skel --extname=mytestCreating directory mytestCreating basic files: config.m4 config.w32 .gitignore mytest.c php_mytest.h CREDITS EXPERIMENTAL tests/001.phpt mytest.php [done].To use your new extension, you will have to execute the following steps:1.  $ cd ..2.  $ vi ext/mytest/config.m43.  $ ./buildconf4.  $ ./configure --[with|enable]-mytest5.  $ make6.  $ ./sapi/cli/php -f ext/mytest/mytest.php7.  $ vi ext/mytest/mytest.c8.  $ makeRepeat steps 3-6 until you are satisfied with ext/mytest/config.m4 andstep 6 confirms that your module is compiled into PHP. Then, start writingcode and repeat the last two steps as often as necessary.

3)进入mytest模块目录,基本结构已经自动生成。

pangu@pangu:~/下载/php-5.6.15/ext$ cd mytestpangu@pangu:~/下载/php-5.6.15/ext/mytest$ lsconfig.m4   CREDITS       mytest.c    php_mytest.hconfig.w32  EXPERIMENTAL  mytest.php  tests

4)修改config.m4文件,dnl是m4工具中的注释语句。去掉图中的注释。

pangu@pangu:~/下载/php-5.6.15/ext/mytest$ vim config.m4

PHP_ARG_WITH(mytest, for mytest support,dnl Make sure that the comment is aligned:[  --with-mytest             Include mytest support])


5)编译

pangu@pangu:~/下载/php-5.6.15/ext/mytest$ phpizeConfiguring for:PHP Api Version:         20121113Zend Module Api No:      20121212Zend Extension Api No:   220121212
pangu@pangu:~/下载/php-5.6.15/ext/mytest$ ./configurechecking for grep that handles long lines and -e... /bin/grepchecking for egrep... /bin/grep -Echecking for a sed that does not truncate output... /bin/sedchecking for cc... ccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables... checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether cc accepts -g... yeschecking for cc option to accept ISO C89... none neededchecking how to run the C preprocessor... cc -Echecking for icc... nochecking for suncc... nochecking whether cc understands -c and -o together... yeschecking for system library directory... libchecking if compiler supports -R... nochecking if compiler supports -Wl,-rpath,... yeschecking build system type... x86_64-unknown-linux-gnuchecking host system type... x86_64-unknown-linux-gnuchecking target system type... x86_64-unknown-linux-gnuchecking for PHP prefix... /usrchecking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/libchecking for PHP extension directory... /usr/lib/php5/20121212checking for PHP installed headers prefix... /usr/include/php5checking if debug is enabled... nochecking if zts is enabled... nochecking for re2c... noconfigure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.checking for gawk... nochecking for nawk... nawkchecking if nawk is broken... nochecking for mytest support... yes, sharedchecking how to print strings... printfchecking for a sed that does not truncate output... (cached) /bin/sedchecking for fgrep... /bin/grep -Fchecking for ld used by cc... /usr/bin/ldchecking if the linker (/usr/bin/ld) is GNU ld... yeschecking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -Bchecking the name lister (/usr/bin/nm -B) interface... BSD nmchecking whether ln -s works... yeschecking the maximum length of command line arguments... 1572864checking whether the shell understands some XSI constructs... yeschecking whether the shell understands "+="... yeschecking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noopchecking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noopchecking for /usr/bin/ld option to reload object files... -rchecking for objdump... objdumpchecking how to recognize dependent libraries... pass_allchecking for dlltool... nochecking how to associate runtime and link libraries... printf %s\nchecking for ar... archecking for archiver @FILE support... @checking for strip... stripchecking for ranlib... ranlibchecking for gawk... (cached) nawkchecking command to parse /usr/bin/nm -B output from cc object... okchecking for sysroot... nochecking for mt... mtchecking if mt is a manifest tool... nochecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking for dlfcn.h... yeschecking for objdir... .libschecking if cc supports -fno-rtti -fno-exceptions... nochecking for cc option to produce PIC... -fPIC -DPICchecking if cc PIC flag -fPIC -DPIC works... yeschecking if cc static flag -static works... yeschecking if cc supports -c -o file.o... yeschecking if cc supports -c -o file.o... (cached) yeschecking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yeschecking whether -lc should be explicitly linked in... nochecking dynamic linker characteristics... GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking whether stripping libraries is possible... yeschecking if libtool supports shared libraries... yeschecking whether to build shared libraries... yeschecking whether to build static libraries... noconfigure: creating ./config.statusconfig.status: creating config.hconfig.status: executing libtool commands
pangu@pangu:~/下载/php-5.6.15/ext/mytest$ make && make test/bin/bash /home/pangu/下载/php-5.6.15/ext/mytest/libtool --mode=compile cc  -I. -I/home/pangu/下载/php-5.6.15/ext/mytest -DPHP_ATOM_INC -I/home/pangu/下载/php-5.6.15/ext/mytest/include -I/home/pangu/下载/php-5.6.15/ext/mytest/main -I/home/pangu/下载/php-5.6.15/ext/mytest -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /home/pangu/下载/php-5.6.15/ext/mytest/mytest.c -o mytest.lo libtool: compile:  cc -I. -I/home/pangu/下载/php-5.6.15/ext/mytest -DPHP_ATOM_INC -I/home/pangu/下载/php-5.6.15/ext/mytest/include -I/home/pangu/下载/php-5.6.15/ext/mytest/main -I/home/pangu/下载/php-5.6.15/ext/mytest -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/pangu/下载/php-5.6.15/ext/mytest/mytest.c  -fPIC -DPIC -o .libs/mytest.o/bin/bash /home/pangu/下载/php-5.6.15/ext/mytest/libtool --mode=link cc -DPHP_ATOM_INC -I/home/pangu/下载/php-5.6.15/ext/mytest/include -I/home/pangu/下载/php-5.6.15/ext/mytest/main -I/home/pangu/下载/php-5.6.15/ext/mytest -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -o mytest.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/pangu/下载/php-5.6.15/ext/mytest/modules  mytest.lo libtool: link: cc -shared  -fPIC -DPIC  .libs/mytest.o    -O2   -Wl,-soname -Wl,mytest.so -o .libs/mytest.solibtool: link: ( cd ".libs" && rm -f "mytest.la" && ln -s "../mytest.la" "mytest.la" )/bin/bash /home/pangu/下载/php-5.6.15/ext/mytest/libtool --mode=install cp ./mytest.la /home/pangu/下载/php-5.6.15/ext/mytest/moduleslibtool: install: cp ./.libs/mytest.so /home/pangu/下载/php-5.6.15/ext/mytest/modules/mytest.solibtool: install: cp ./.libs/mytest.lai /home/pangu/下载/php-5.6.15/ext/mytest/modules/mytest.lalibtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/sbin" ldconfig -n /home/pangu/下载/php-5.6.15/ext/mytest/modules----------------------------------------------------------------------Libraries have been installed in:   /home/pangu/下载/php-5.6.15/ext/mytest/modulesIf you ever happen to want to link against installed librariesin a given directory, LIBDIR, you must either use libtool, andspecify the full pathname of the library, or use the `-LLIBDIR'flag during linking and do at least one of the following:   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable     during execution   - add LIBDIR to the `LD_RUN_PATH' environment variable     during linking   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag   - have your system administrator add LIBDIR to `/etc/ld.so.conf'See any operating system documentation about shared libraries formore information, such as the ld(1) and ld.so(8) manual pages.----------------------------------------------------------------------Build complete.Don't forget to run 'make test'.Build complete.Don't forget to run 'make test'.=====================================================================PHP         : /usr/bin/php PHP_SAPI    : cliPHP_VERSION : 5.5.9-1ubuntu4.14ZEND_VERSION: 2.5.0PHP_OS      : Linux - Linux pangu 3.13.0-66-generic #108-Ubuntu SMP Wed Oct 7 15:20:27 UTC 2015 x86_64INI actual  : /home/pangu/下载/php-5.6.15/ext/mytest/tmp-php.iniMore .INIs  :  CWD         : /home/pangu/下载/php-5.6.15/ext/mytestExtra dirs  : VALGRIND    : Not used=====================================================================TIME START 2015-11-02 12:08:50=====================================================================PASS Check for mytest presence [tests/001.phpt] =====================================================================TIME END 2015-11-02 12:08:50=====================================================================TEST RESULT SUMMARY---------------------------------------------------------------------Exts skipped    :    0Exts tested     :   43---------------------------------------------------------------------Number of tests :    1                 1Tests skipped   :    0 (  0.0%) --------Tests warned    :    0 (  0.0%) (  0.0%)Tests failed    :    0 (  0.0%) (  0.0%)Expected fail   :    0 (  0.0%) (  0.0%)Tests passed    :    1 (100.0%) (100.0%)---------------------------------------------------------------------Time taken      :    0 seconds=====================================================================This report can be automatically sent to the PHP QA team athttp://qa.php.net/reports and http://news.php.net/php.qa.reportsThis gives us a better understanding of PHP's behavior.If you don't want to send the report immediately you can chooseoption "s" to save it.You can then email it to qa-reports@lists.php.net later.Do you want to send this report now? [Yns]: n


6)查看phpinfo内容,找到引用的php.ini文件位置,扩展模块位置。

Loaded Configuration File/etc/php5/apache2/php.ini

PHP Extension20121212

7)将生成的so文件复制到扩展目录;修改php.ini,加入扩展模块。

pangu@pangu:~/下载/php-5.6.15/ext/mytest$ cd modulespangu@pangu:~/下载/php-5.6.15/ext/mytest/modules$ lsmytest.la  mytest.sopangu@pangu:~/下载/php-5.6.15/ext/mytest/modules$ sudo cp mytest.so /usr/lib/php5/20121212[sudo] password for pangu: pangu@pangu:~/下载/php-5.6.15/ext/mytest/modules$ 

pangu@pangu:~/下载/php-5.6.15/ext/mytest/modules$ sudo vim /etc/php5/apache2/php.ini

; ... or under UNIX:;;   extension=msql.so;; ... or with a path:;;   extension=/path/to/extension/msql.so;; If you only provide the name of the extension, PHP will look for it in its; default extension directory.;extension=mytest.so

8)重启APACHE

pangu@pangu:~/下载/php-5.6.15/ext/mytest/modules$ sudo service apache2 restart * Restarting web server apache2                                                

9)查看PHPINFO内容。

mytest supportenabled



十、安装mysql

sudo apt-get install mysql-server




其它:

找包:dpkg -L php5


0 0