vps

手把手教你在centos下编译安装配置高性能web服务器环境nginx+php(fast-cg...

徘徊边缘 提交于 2019-11-27 15:23:32
本文为实战操作过程的全程记录,采用一台新创建的 linode vps (512M内存)环境,操作系统采用centos 6.2,以从源码编译的方式安装配置nginx, php(fast-cgi模式)web环境。 我们的目标:配置一台高性能、安全的web服务器。所需软件如下: Nginx(英文) Nginx(简体中文) 公认的高性能web服务器[ 下载 http://nginx.org/en/download.html] PHP 应用最广泛的web开发语言[ 下载 http://www.php.net/downloads.php] MySQL 广泛应用于web服务器上的数据库,速度快[ 下载 http://www.mysql.com/downloads/mysql/] phpMyAdmin 使用php开发的基于web的MySQL管理工具 [ 下载 http://www.phpmyadmin.net/home_page/downloads.php] 准备工作: 我的这台vps主机名为fsvps,有一个普通用户名为feng,通常我就使用这个用户登录管理,只有需要使用root身份时才su切换到管理员,只要不再需要使用root权限就退回到普通用户下。建议你也这样操作,以免误操作造成不可挽回的灾难。 通过ssh(windows下可以使用putty,建议去官方下载英文原版)登录服务器

What is difference between Lightsail and EC2? [closed]

倖福魔咒の 提交于 2019-11-27 05:51:59
Recently Amazon launched Lightsail . Is there any difference between them? If yes, then what's the difference? Are Lightsail instances more powerful than EC2? Testing¹ reveals that Lightsail instances in fact are EC2 instances, from the t2 class of burstable instances. EC2, of course, has many more instance families and classes other than the t2, almost all of which are more "powerful" (or better equipped for certain tasks) than these, but also much more expensive. But for meaningful comparisons, the 512 MiB Lightsail instance appears to be completely equivalent in specifications to the

Extract text from doc and docx

主宰稳场 提交于 2019-11-26 22:12:30
I would like to know how can I read the contents of a doc or docx. I'm using a Linux VPS and PHP, but if there is a simpler solution using other language, please let me know, as long as it works under a linux webserver. no_freedom This is a .DOCX solution only. For .DOC or .PDF you'll need to use something else like pdf2text.php for PDF function docx2text($filename) { return readZippedXML($filename, "word/document.xml"); } function readZippedXML($archiveFile, $dataFile) { // Create new ZIP archive $zip = new ZipArchive; // Open received archive file if (true === $zip->open($archiveFile)) { //

Hosting two domains using only one VPS?

眉间皱痕 提交于 2019-11-26 18:44:57
问题 Is it possible? Someone told me it is but I'm not sure. If its possible, how should I do it? I have one /www folder where my website lies. How can I configure 2 different sites? 回答1: The procedure is: Point both domains to the ip of the VPS. Configure the webserver you have installed on your VPS to answer to those two domains. In the case of Nginx with Passenger, it is a matter of adding entries to you nginx.conf file. Like this: server { listen 80; server_name domain1; root /path/to/your

Java seems to ignore -Xms and -Xmx options

一曲冷凌霜 提交于 2019-11-26 17:15:40
问题 I'd like to run a very simple bot written in java on my VPS. I want to limit jvm memory to let's say 10MB (I doubt it would need any more). I'm running the bot with the following command: java -Xms5M -Xmx10M -server -jar IrcBot.jar "/home/jbot" But top shows that actual memory reserved for java is 144m (or am I interpreting things wrong here?). 13614 jbot 17 0 144m 16m 6740 S 0.0 3.2 0:00.20 java Any ideas what can be wrong here? Java version "1.6.0_20" Java(TM) SE Runtime Environment (build

Free Tier VPS Bench Comparison for AWS, Azure and Google Cloud

女生的网名这么多〃 提交于 2019-11-26 16:27:54
All of AWS, Azure and Google Cloud are providing some kind of free tier to the users. I am always wondering how those free tier VPS performance looks like. I did some bench work to test them out. Here is the method and result. Bench script: https://github.com/n-st/nench provides a nice bench.sh and a single command for you to run this script on your VPS. Commands to run this script: (curl -s wget.racing/nench.sh | bash; curl -s wget.racing/nench.sh | bash) 2>&1 | tee nench.log (wget -qO- wget.racing/nench.sh | bash; wget -qO- wget.racing/nench.sh | bash) 2>&1 | tee nench.log Basically this

Extract text from doc and docx

我只是一个虾纸丫 提交于 2019-11-26 08:11:25
问题 I would like to know how can I read the contents of a doc or docx. I\'m using a Linux VPS and PHP, but if there is a simpler solution using other language, please let me know, as long as it works under a linux webserver. 回答1: This is a .DOCX solution only. For .DOC or .PDF you'll need to use something else like pdf2text.php for PDF function docx2text($filename) { return readZippedXML($filename, "word/document.xml"); } function readZippedXML($archiveFile, $dataFile) { // Create new ZIP archive