一、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 Zips |
Mars |Luna |Kepler | |
![]() | Babel 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=mytest
Creating directory mytest
Creating 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.m4
3. $ ./buildconf
4. $ ./configure --[with|enable]-mytest
5. $ make
6. $ ./sapi/cli/php -f ext/mytest/mytest.php
7. $ vi ext/mytest/mytest.c
8. $ make
Repeat steps 3-6 until you are satisfied with ext/mytest/config.m4 and
step 6 confirms that your module is compiled into PHP. Then, start writing
code and repeat the last two steps as often as necessary.
3)进入mytest模块目录,基本结构已经自动生成。
pangu@pangu:~/下载/php-5.6.15/ext$ cd mytest
pangu@pangu:~/下载/php-5.6.15/ext/mytest$ ls
config.m4 CREDITS mytest.c php_mytest.h
config.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])
pangu@pangu:~/下载/php-5.6.15/ext/mytest$ phpize
Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212
pangu@pangu:~/下载/php-5.6.15/ext/mytest$ ./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking 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/lib
checking for PHP extension directory... /usr/lib/php5/20121212
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for mytest support... yes, shared
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) nawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.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.so
libtool: 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/modules
libtool: install: cp ./.libs/mytest.so /home/pangu/下载/php-5.6.15/ext/mytest/modules/mytest.so
libtool: install: cp ./.libs/mytest.lai /home/pangu/下载/php-5.6.15/ext/mytest/modules/mytest.la
libtool: 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/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify 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 for
more 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 : cli
PHP_VERSION : 5.5.9-1ubuntu4.14
ZEND_VERSION: 2.5.0
PHP_OS : Linux - Linux pangu 3.13.0-66-generic #108-Ubuntu SMP Wed Oct 7 15:20:27 UTC 2015 x86_64
INI actual : /home/pangu/下载/php-5.6.15/ext/mytest/tmp-php.ini
More .INIs :
CWD : /home/pangu/下载/php-5.6.15/ext/mytest
Extra 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 : 0
Exts tested : 43
---------------------------------------------------------------------
Number of tests : 1 1
Tests 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 at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "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 Extension | 20121212 |
7)将生成的so文件复制到扩展目录;修改php.ini,加入扩展模块。
pangu@pangu:~/下载/php-5.6.15/ext/mytest$ cd modules
pangu@pangu:~/下载/php-5.6.15/ext/mytest/modules$ ls
mytest.la mytest.so
pangu@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 support | enabled |
---|
十、安装mysql
sudo apt-get install mysql-server
其它:
找包:dpkg -L php5