Page5 of 37 1 3 4 5 6 7 37
17 04 2011

How to put IntelliJ IDEA on Ubuntu

#bigCat.Linux(" Comment.isBlank ")

http://techbrew.net/articles/200711/how-to-put-intellij-idea-on-ubuntu/

 

I’ve been a user of the excellent IntelliJ Java IDE for 4 years on Windows. Even though the official Linux support by JetBrains is only for RedHat, you can also install IntelliJ fairly easily on Ubuntu. I’ve tested this with Xubunto 7.10 (Gutsy), Java 6, and IntelliJ 7. Here’s how to do it in four basic steps:

1) Get Java

Install the Java 6 JDK, which IDEA itself needs to run. (You can have other JDKs for your projects, but you’ll need this one to run IntelliJ itself.) For example, type this in a terminal:

sudo apt-get install sun-java6-jdk

Follow the prompts for root password, download confirmation, and eventually the Sun EULA to install Java itself. If it installed successfully, you should be able to type this at a prompt:

java -version

… to get several lines telling you the version of Java you have installed. If this doesn’t work, refer to Sun’s documentation on troubleshooting installations.

2) Get IntelliJ IDEA

Download the latest version of IntelliJ IDEA for Linux:

http://www.jetbrains.com/idea/download/index.html#linux

Once the download is finished, extract the archive using the correct filename according to your download. For example, to install IntelliJ in /usr/lib, do the following:

tar xfz idea-7.0.1.tar.gz ./usr/lib/

The IntelliJ installation will now be in a subdirectory indicating the build number, in the format “idea-xxxx”. In the case of IDEA 7.0.1, the app directory is “idea-7364“. (Once the extraction is done, you can delete the downloaded archive to conserve disk space if needed.)

3) Get Environmental

There are a couple of environment variables to be taken care of. First, you need to set a new environment variable that tells IntelliJ where your install of Java is. For example:

export JDK_HOME="/usr/lib/jvm/java-6-sun/"

Use the “env” command, or just “echo $JDK_HOME“, to verify the variable is set.

Next, you’ll need to edit /etc/environment with superuser rights in the editor of your choice, adding the idea-xxxx/bin directory to your PATH variable. For example, you can edit the environment with the GUI mousepad editor like so:

sudo mousepad /etc/environment

The various directories in the environment PATH variable are delineated by colons (:). Append the current value (inside the quotes) with a new colon and then add the idea-xxxx/bin location. It should look something like this:

PATH="/usr/local/sbin:/usr/local/bin:/usr/lib/idea-7364/bin"

Save and close the environment file. You’ll need to “source” it for your system to pick up the new directory in the PATH. You can verify your changes by echoing the variable as well:

source /etc/environment
echo $PATH

If you see the path to IntelliJ returned in the output, you’re all set.

Lastly, you may want to change the VM settings of IntelliJ. This depends entirely on your project size and other factors, so you’ll need to base these settings on your own need. The settings are in idea-xxx/bin/idea.vmoptions.

4) Get Started!

That’s it. Now you can run “idea.sh” from a terminal in any directory, and IntelliJ should launch…

idea.sh

If you run into problems, be sure to double-check the readme files in the installation directory.

Give Back

If this article proved useful to you, please drop us a comment and let us know. Or, if you find problems/alternate solutions along the way, please share them for the benefit of others. Thanks and happy coding!

17 04 2011

Setting up Zend Optimizer on Media Temple (dv)

#bigCat.Linux(" Comment.isNotBlank ")

http://www.thesourcelounge.com/web-servers/mediatemple-dv-zend-optimizer

So I recently had an upgrade on a client server from Media Temple. They had a gs account and was upgraded to a dedicated server. Sounds great? Well the first thing I ran into was that their admin no longer worked since it used Zend Optimizer for some of the plugins. Media Temple (dv) uses ion cube. Oh shit…
So I decided to list my steps for getting zend optimizer on a dv sever in case anyone else needed it.

You will need to ssh into your account. I like putty for ssh, you can get it here.

1) Go to Zend official site. http://www.zend.com/
2) Find and download the Zend Optimizer 3.3. I am using the 3.3.3 package.
3) Download it directly to your server.
wget http://downloads.zend.com/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
4) Decompress it.
tar xvfz ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
5)Move to the new folder and install.
cd ZendOptimizer-3.3.3-linux-glibc23-i386
./install

6. Follow the steps to install.

7. After the installation, you will notice some new lines in your php.ini file.
cd /etc
vi php.ini

8. Comment out all of the new Zend lines. (generally at the very end of the .ini file).

Example:
[Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.9
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.4
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

9. Now we will disable ioncube.
/etc/php.d/
vi ioncube-loader.ini

10. comment out the line
zend_extension=/usr/lib/php/php_ioncube_loader_lin.so

and replace with your zend optimizer lines

zend_extension=/usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so
zend_optimizer.optimization_level=15

Now save your .ini file and restart apache.
Service httpd restart

You should set up a phpinfo file to test that you have successfully installed Zend Optimizer.
I am sure there are many ways of doing this, but this is what worked for me on a MediaTemple 3.5(dv) server. Hope it helps someone else too!

15 04 2011

windows 下查端口占用对应的程序

#bigCat.NoteBook(" Comment.isBlank ")
C:\>netstat -aon|findstr "9050" TCP 127.0.0.1:9050
0.0.0.0:0 LISTENING 2016
端口被PID为2016的进程占用
C:\>tasklist|findstr "2016"
durex.exe                     2016 Console                 0     16,064 K
durex占用了你的端口
9 04 2011

red hat/cent os 安装 openvpn

#bigCat.Linux(" Comment.isBlank ")

安装EPEL的RPM文件包

32-bit:rpm -ivh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
64-bit:rpm -ivh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

YUM安装

yum install openvpn

程序安装到了这个目录:/usr/share/openvpn/easy-rsa

http://www.21andy.com/blog/20100327/1794.html

http://vpnblog.info/ubuntu-openvpn-strongvpn-tutorial.html

8 04 2011

Clear Brute Force in SSH

#bigCat.Linux(" Comment.isBlank ")
/usr/local/cpanel/etc/init/stopcphulkd 

will stop cPHulkD until chksrvd starts it back up again within 8 minutes.

Page5 of 37 1 3 4 5 6 7 37
Host: (miao) | Word: Press | Code: bigCat | Valid: HTML5